P0660R10 <stop_token> And jthread
P1869R1 Renaming condition_variable_any's Interruptible Wait Methods
LWG-3254 Strike stop_token's operator!=
LWG-3362 Strike stop_source's operator!=
The IDE's list of extensionless headers has been updated for VS 2019 16.5.
Feature-test macro as of WG21-N4842:
#define __cpp_lib_jthread 201911L
This is another issue I'd be very willing to implement! This one is definitely more involved than the other issues I've addressed and will require more involved testing as well. I'm willing to help implement this and provide the tests if this issue is open to work on?
My first plan of attack would be to reference Nicolai Josuttis's implementation and build from there.
I caution you not to examine or refer to Nico's implementation: the licensing is unclear. There is a clear license statement for the "code examples" - Nico doesn't want people stealing his book material! - but I can't determine what license applies to any non "code examples". (It's not terribly clear what is or is not a "code example.")
Would you then by chance have any recommendations, or should I just build upon the current std::thread implementation?
or should I just build upon the current
std::threadimplementation?
I'd start by deriving jthread privately from thread, and work though the proposal from there. jthread without <stop_token> should be trivial. <stop_token> will make things much more exciting. (I suspect this will work better as a Draft PR with lots of communication than if you go if and try to finish everything on your own.)
Hi guys, what is the current state of this issue? @NathanSWard are you still working on this?
Would it be possible to start with the implementation in cpprest repository? @StephanTLavavej @BillyONeal
pplx::cancellation_token
Hi @jbrezina
Sorry I've been MIA for a while, but now that school is done with for the semester, I've actually been able to work on this a little bit and was actually planning on reopening the PR later today/tomorrow! I have a more-or-less functioning implementation (minus the cond_var side of the paper). Though I'd gladly take any feed back and if you want to help improve my code I'd gladly do joint development on this!
Update:
@jbrezina @StephanTLavavej @BillyONeal
Upon working on my jthread implementation that I initially set up last year, I realized that it is quite heavily based on Nicolai Josuttis's and after rereading my previous conversation with @CaseyCarter in this thread, I don't know if my branch will be able to be merged due to the licensing around Nicolai's implementation and my own. Here is the link to my branch on my forked STL repo, if interested. In light of the licensing dilemma, @jbrezina you are more than welcome to work on <stop_token>/thread implementation!
Thanks - yeah, we need to be careful about licensing. Code written from scratch, Apache 2.0 with LLVM exception, and Boost are all ok. For anything else, we need to look into it ahead of time, to avoid accumulating work that can't be merged.