Some quick high-level feedback, after reading the docs.
Is Boost.Spawn intended to be useful on its own, or is it only usable in
Boost.ASIO?
The provided link points to the docs. Is there an associated source code?
Or are you just checking if there is sufficient interest?
The "Effects" clause of the third overload has " on behalf of spawned
spawn", which is supposed to be " on behalf of spawned fiber", I guess.
Regards,
&rzej;
niedz., 28 lis 2021 o 07:50 Oliver Kowalke via Boost <bo...@lists.boost.org>
napisał(a):
> Am Mo., 29. Nov. 2021 um 21:30 Uhr schrieb Niall Douglas via Boost <
> bo...@lists.boost.org>:
>
> >
> > As an alternative, how about announcing the complete removal of
> > Boost.Coroutine with two major release notice (including this release)?
> > That should spur Boost.ASIO being upgraded to Boost.Coroutine2.
> >
>
> That had already happen some years ago - including warnings during
> compilations - but didn't help. Ask Vini...
> At the end I was forced to remove the compiler (preprocessor) warnings.
>
Please correct me if I am wrong, but my understanding is that Boost.ASIO
works under C++03, and so does Boost.Coroutine. Whereas Boost.Coroutine2
requires C++11. If Boost.ASIO were to switch from BoostCoroutine to
Boost.Coroutine2, it would break its C++03 guarantee. (Some teams in my
work still have to use C++03.)
"Boost.Spawn" could be an addition to Boost.ASIO, but not a replacement,
right?
Regards,
&rzej;
>
>
> pon., 29 lis 2021 o 21:39 Oliver Kowalke via Boost <bo...@lists.boost.org>
> napisał(a):
>
>> Am Mo., 29. Nov. 2021 um 21:30 Uhr schrieb Niall Douglas via Boost <
>> bo...@lists.boost.org>:
>>
>> >
>> > As an alternative, how about announcing the complete removal of
>> > Boost.Coroutine with two major release notice (including this release)?
>> > That should spur Boost.ASIO being upgraded to Boost.Coroutine2.
>> >
>>
>> That had already happen some years ago - including warnings during
>> compilations - but didn't help. Ask Vini...
>> At the end I was forced to remove the compiler (preprocessor) warnings.
>>
>
> Please correct me if I am wrong, but my understanding is that Boost.ASIO
> works under C++03, and so does Boost.Coroutine. Whereas Boost.Coroutine2
> requires C++11. If Boost.ASIO were to switch from BoostCoroutine to
> Boost.Coroutine2, it would break its C++03 guarantee. (Some teams in my
> work still have to use C++03.)
>
> "Boost.Spawn" could be an addition to Boost.ASIO, but not a replacement,
> right?
>
boost.spawn can not replace boost.asio - only it's functionality
boost::asio::spawn()
I don't think Andrzej was suggesting that.
I think the question is fair - if Boost.Spawn (though I'd really prefer
a more specific name) is C++11, how Boost.ASIO can switch to it while
still supporting C++03?
And if Boost.Spawn is updated to also support C++03, how is it different
from Boost.Coroutine?
> Andrzej Krzemienski wrote:
> > Please correct me if I am wrong, but my understanding is that Boost.ASIO
> > works under C++03, and so does Boost.Coroutine. Whereas Boost.Coroutine2
> > requires C++11. If Boost.ASIO were to switch from BoostCoroutine to
> > Boost.Coroutine2, it would break its C++03 guarantee. (Some teams in my
> > work still have to use C++03.)
>
> It's a bit more complex than that. Boost.Coroutine depends on
> Boost.Context,
> which is C++11. However, in order to not break C++03, Coroutine doesn't use
> the public API of Context, but the private "fcontext" parts that are kept
> C++03
> compatible only because of that. This incidentally means that if you
> compile
> Context with the `ucontext` backend instead of the `fcontext` one,
> Coroutine breaks.
>
> So it's basically a mess and needs to be cleaned up. Since asio::spawn is a
> separate part of Asio, moving just it to C++11 wouldn't be as disruptive a
> change as requiring C++11 for all of Asio.
>
Thanks for this explanation.
I am not familiar with the details of the issue, so I basically work based
on the information in this thread.
I am trying to figure out whether the proposed Boost.Spawn better fits
inside Boost.ASIO or in a separate library.
My current understanding is that a C++03 user that does not use the
`ucontext` backend can successfully use `boost::asio:::spawn()` today, and
if the implementation of `boost::asio:::spawn()` were simply upgraded to
use the proposed implementation, the said C++03 user would be hurt. Is this
correct?
If this is correct, it means that the new implementation cannot fully
replace `boost::asio:::spawn()`, but it can be used as an addition, so that
the users can be offered two functions:
boost::asio::spawn_fiber() // preferred if you are C++11 or higher
boost::asio::spawn() // dangerous, but works with C++03
Would this be a correct summary?
Regards,
&rzej;