Closed tomarrell closed 1 year ago
During the initialisation of the server, there are unprotected writes. If the server is closed quickly enough, the writes will race against the closing reads.
This PR acquires locks before writing to the server during initialisation.
This appears rarely and on slow, single core runners such as CI. https://github.com/tomarrell/miniqueue/actions/runs/3968262794/jobs/6801201158
I've also intentionally locked only the assignments, as the returned serve(...) call also acquires the same lock.
serve(...)
LGTM. Thanks :)
During the initialisation of the server, there are unprotected writes. If the server is closed quickly enough, the writes will race against the closing reads.
This PR acquires locks before writing to the server during initialisation.
This appears rarely and on slow, single core runners such as CI. https://github.com/tomarrell/miniqueue/actions/runs/3968262794/jobs/6801201158