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
{{ message }}
This repository has been archived by the owner on Nov 14, 2021. It is now read-only.
The sync.Map and the len variable are not controlled by mutex/atomic operation. So they can be modified by different threads independently. During a simultanous add and delete, a non empty room can be destroyed. This seems to be a race condition?
What did you expect?
No race conditions present.
What happened?
The text was updated successfully, but these errors were encountered:
@Tillaert that is an excellent point! You are right, we need to perform transactions. I would change sync.Map to just a normal map. Then just put a mutex on the entire structure.
If you have interest in this repo I would love to give you write access! I think it would be great if we had a simple signaler for people to use. We could also extend to do other useful things. I just don't have the bandwidth myself :(
Your environment.
What did you do?
signaler/internal/room/room.go
Line 11 in c11bee9
The sync.Map and the len variable are not controlled by mutex/atomic operation. So they can be modified by different threads independently. During a simultanous add and delete, a non empty room can be destroyed. This seems to be a race condition?
What did you expect?
No race conditions present.
What happened?
The text was updated successfully, but these errors were encountered: