-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
Description
I've not yet fully convinced myself but I think there's a potential timing issue with the dequeMutex in CoroSemaphore. Specifically around changing the value of the atomic free and then acquiring the dequeMutex.
I think we could potentially run into an issue where acquire writes to free and then needs to suspend, but before that acquire call locks the muxtex release reads and modifies free which indicates there is a suspended continuation and managed to acquire the mutex first. In this case it won't find a continuation to resume, so have we now become out of sync between the free count and number of suspended continuations?
Reactions are currently unavailable