This change "locks" users when assigning or removing roles. This fixes a race condition where mutually exclusive roles are not being assigned correctly. (See #65 )
Note: the code is using a "mutex lock", as in, a mutual-exclusion lock as seen in concurrent programming paradigms. Confusingly, this mechanism shares a name with the bot's mutually exclusive (or "mutex") role feature, and was also necessary to fix a bug in the mutually exclusive role feature. However, these two concepts are totally distinct. One is a concept in asynchronous programming. The other just stops you from having two specific Discord roles.
This change "locks" users when assigning or removing roles. This fixes a race condition where mutually exclusive roles are not being assigned correctly. (See #65 )
Note: the code is using a "mutex lock", as in, a mutual-exclusion lock as seen in concurrent programming paradigms. Confusingly, this mechanism shares a name with the bot's mutually exclusive (or "mutex") role feature, and was also necessary to fix a bug in the mutually exclusive role feature. However, these two concepts are totally distinct. One is a concept in asynchronous programming. The other just stops you from having two specific Discord roles.
Names are hard :face_exhaling: