You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is the following going to decrease/eliminate the chances of us failing to complete the event because another thread "hijacked" the state after this line?
We could introduce another state, called "AttemptingToComplete". Before executing TryMarkEventComplete, we don't reset the state to "ReadyToProcess", instead we change it to AttemptingToComplete. And only, if TryMarkEventComplete failed, we reset to "ReadyToProcess".
I am not sure if this is going to introduce too much complexity, or, perhaps, a race for completion between different threads.
Is the following going to decrease/eliminate the chances of us failing to complete the event because another thread "hijacked" the state after this line?
We could introduce another state, called "AttemptingToComplete". Before executing
TryMarkEventComplete
, we don't reset the state to "ReadyToProcess", instead we change it toAttemptingToComplete
. And only, ifTryMarkEventComplete
failed, we reset to "ReadyToProcess".I am not sure if this is going to introduce too much complexity, or, perhaps, a race for completion between different threads.
Originally posted by @AlekseyTs in #65083 (comment)
The text was updated successfully, but these errors were encountered: