That's certainly an interesting approach.
It's got a maximum latency problem though.
If for some reason the unlucky thread that acquires the lock cannot process the batch faster than other threads are adding.... well that ends poorly
It's got a maximum latency problem though.
If for some reason the unlucky thread that acquires the lock cannot process the batch faster than other threads are adding.... well that ends poorly