Closed fortytw2 closed 1 year ago
@fortytw2 Thanks so much for this!
If you wouldn't mind adding a test that would be perfect!
Of course! Added a test that fails without the additional locks @chelnak. Thanks for the great library :)
Thank you for the test.
It's actually highlighted something unexpected. The race condition actually appears to be coming from AddSpinner
.
This doesn't happen when you use a mutex inside the method and seems to be validated by your test.
Do you see a similar thing?
I can see you spotted it too.
@fortytw2 If there is anything I can do to help progress this let me know.
As soon as we merge, I'm happy to cut a release 🙂
Should be good to go @chelnak - let me know if you'd like me to rebase/squash commits in here before merging.
Nah I think we are all good. Your commits are clear enough to me!
@fortytw2 https://github.com/chelnak/ysmrr/releases/tag/v0.2.1 ❤️
Thanks @chelnak !
Hey! Started using this repo after needing multiple spinners (migrated from
yacspin
) and noticed a race condition caused by(*Spinner).Print(
whenUpdateMessage(
is used from different goroutines.I can add a test that reproduces this race detector failure if you'd like, too.