You could use golang.org/x/sync/semaphore NewWeighted(1) Aquire will return in order
Graham On Friday, September 9, 2022 at 8:12:46 PM UTC+1 ChrisLu wrote: > "sync.Mutex" is not FIFO. Has any package implemented a dropping for FIFO > mutex? > > One similar solution is to use buffered channel, but it is limited by the > buffer size, and requires non-trivial re-architecturing. > > Chris > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/7290f721-cd9a-4c8c-914b-4f9742e0bcb7n%40googlegroups.com.