PostHog / posthog-go

Official PostHog Go library
MIT License
20 stars 17 forks source link

fix race condition and some other things #22

Closed verygoodsoftwarenotvirus closed 11 months ago

verygoodsoftwarenotvirus commented 11 months ago
neilkakkar commented 11 months ago

Thanks for the contribution @verygoodsoftwarenotvirus :) - could you walk me through what's the race condition please, and why we need another mutex on top of the current one to fix it?

verygoodsoftwarenotvirus commented 11 months ago

could you walk me through what's the race condition please, and why we need another mutex on top of the current one to fix it?

I tried, and then I realized I couldn't, and in fact I could make use of the pre-existing mutex in a place where it was simply needed, and was able to satisfy the race detector anyway. Thanks.