acaloiaro / neoq

Queue-agnostic background job library for Go, with a pleasant API and powerful features.
MIT License
270 stars 4 forks source link

fix(pg): Fixed data race conditions in unit tests #95

Closed elliotcourant closed 1 year ago

elliotcourant commented 1 year ago

Since these values are being written in a separate go routine, it is possible for a datarace to happen since we are reading them unatomically. This just makes it so that both the reads ands writes are done atomically.

Resolves #76

elliotcourant commented 1 year ago

You can see the original failure here: https://github.com/acaloiaro/neoq/actions/runs/6434492619/job/17473826127