|
Boost Users : |
Subject: Re: [Boost-users] [coroutine] Launch a thread in a coroutine
From: Pierre Talbot (ptalbot_at_[hidden])
Date: 2014-01-18 02:20:51
On 01/16/2014 03:36 PM, Oliver Kowalke wrote:
> 2014/1/15 Pierre Talbot <ptalbot_at_[hidden] <mailto:ptalbot_at_[hidden]>>
>
> void
> push_data(boost::coroutines::coroutine<std::string>::push_type& sink)
> {
> sink("test1");
> t = std::thread(push_data2, std::move(sink));
> }
>
>
> 'sink' is synthesized by the framework and is attached to coroutine-stack.
> because you move the synth. coroutine, the code inside the framework
> can't access it any more (therefore the assertion from intrusive_ptr<>).
>
Thanks, is there something planned in the future for such a capability,
as a function "move_to_thread"? Or is there a way that already exists to
do that?
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net