spring-attic / reactive-streams-commons

A joint research effort for building highly optimized Reactive-Streams compliant operators.
Apache License 2.0
357 stars 51 forks source link

Add IndexedQueue contract to optimize draining paths #14

Open smaldini opened 8 years ago

smaldini commented 8 years ago

IndexedQueue usually work with volatile consumer indices. We could define a convention to "batch" increment this index by doing it once at the end of drain loops instead of using queue.poll() that increments index everytime.