•Created by bighugemassive3 on 12/12/2024 in #help
Race condition with Interlocked.Exchange
I guess InvokeAsync updated the value after the first ExecuteCore, and then that cleared the value. But because InvokeAsync was called during the first ExecuteCore, the critical state got set so ExecuteCore was called again
•Created by bighugemassive3 on 12/12/2024 in #help
Race condition with Interlocked.Exchange
Which is why I introduced the critical continue state, which tells the task to keep running since InvokeAsync was invoked very closely around ExecuteCore
•Created by bighugemassive3 on 12/12/2024 in #help
Race condition with Interlocked.Exchange
I don't see how it's possible though, a new task is only started if S_RUNNING is not present, and S_RUNNING is removed from the state when the current task is just about to exit