C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Proposal for `std::fiber<T>` Language-Level Extension in C++23

From: 1one1 <ahshabazz_at_[hidden]>
Date: Fri, 7 Jul 2023 07:34:51 +0000 (UTC)
I've provided you with the reference materials you've asked for. In your case, the correct reply should be, "Thank You!"
Feel free to ask me any questions that are related to the topic.
Regards, Abdul S.

On Friday, July 7, 2023, 03:25, Fabio Alemagna <falemagn_at_[hidden]> wrote:

ll giorno ven 7 lug 2023 alle ore 09:21 1one1 via Std-Proposals
<std-proposals_at_[hidden]> ha scritto:
>
> The concept as proposed is quite novel, and may not have an exact counterpart in existing libraries.
>
> However, certain elements of the proposal can be found separately in various libraries and projects:
>
> Concurrency with Fibers: Boost library provides boost::fibers, which implements a form of cooperative multitasking on a single thread, somewhat similar to what we discussed for std::fiber<T>. Documentation and examples are available on the Boost.Fiber documentation page.
>
> Copy-on-Write (COW): You can find many C++ projects implementing COW semantics for specific use cases, such as COW string optimization in STL implementations. However, keep in mind that this pattern may not scale well for complex, large data structures.
>
> Read-Copy-Update (RCU): RCU is commonly used in kernel programming. The Userspace RCU library (liburcu) is a C implementation of RCU that could be studied for its semantics, though it's not designed specifically for C++ or the fiber model we've discussed.
>
> Lock-Free and Concurrent Data Structures: Libraries like Concurrent Data Structures (CDS) and Intel Threading Building Blocks (TBB) offer various concurrent and lock-free data structures that could be instructive for thinking about thread-safe data management.
>
> Each of these elements provides a piece of the std::fiber<T> puzzle but does not fully realize the proposed concept. The creation of a std::fiber<T> library would likely require combining and extending these techniques in new ways.
>
> Please note that while these resources can provide a good start, the task of combining these techniques to mimic std::fiber<T> is nontrivial.

I use ChatGPT daily for my job, but in the event I thought of asking
it what reply to give in a human-to-human conversation, I wouldn't
just copy'n'paste its response, at least not without attributing it to
ChatGPT itself.

Please, let's not make this awkward.

Fabio




Received on 2023-07-07 07:34:59