renestein / Rstein.AsyncCpp

The RStein.AsyncCpp library is a set of types that should be familiar for anyone who knows the Task Parallel Library (TPL) for .NET (C#).
MIT License
31 stars 4 forks source link

Should there be a lock_guard before this change of Task _state? #42

Open lawabider opened 1 year ago

lawabider commented 1 year ago

https://github.com/renestein/Rstein.AsyncCpp/blob/613eace161115e67bfb9322d537557c78e3495f2/RStein.AsyncCpp/Detail/Tasks/TaskHelpers.h#L168 I have been trying to trace the cause of some intermittent non-completion of tasks.

renestein commented 1 year ago

Yes, looks like the bug. The lock guard is missing. I will fix this. Thanks for the report and sorry for the inconvenience.