Closed spnda closed 1 month ago
Thanks for the report - I'll take a look shortly.
I just noticed that the GetIsRunning
function is deprecated and that GetIsShutdownRequested
should be used instead. The example should be updated and the documentation should be changed to clarify that the other function should not be used. Also, perhaps it should be marked [[deprecated]]
to clarify that it is deprecated since I didn't notice until reading the documentation by accident.
Perhaps I can send a PR?
I think the best option might be to make GetIsRunning()
return GetIsShutdownRequested()
, however this is used internally so another private function instead of GetIsRunning()
. The C API also needs to be updated.
I also mark as deprecated and change the sample to use GetIsShutdownRequested()
.
Since deprecated is C++14 and enkiTS is C++11 that requires a macro to only enable if the feature is present.
Since this requires a few internal changes I think I would prefer to handle most of it, but if you would like to submit a PR for switching the sample to GetIsShutdownRequested()
and optionally the [[deprecated]]
using an ENKI_DEPRECATED
macro then I would accept those, but I'm also happy to do them myself.
I have those changes locally already so I'll just push and open, thank you.
Running the
WaitForNewPinnedTasks
example deadlocks withinTaskScheduler::WaitforAll
at the end when callingWaitforAllAndShutdown
, since the pinned task thread will continue to run, asg_TS.GetIsRunning
won't return false. The pinned task thread will then just continue to loop its function and theWaitforAll
will never return, since that thread will report that it's doing something.