Always equal to recommendedBatchSize-1
.
Always equal to recommendedBatchSize-1
.
Provided for convenience.
Returns the next frame index in the run-loop.
Returns the next frame index in the run-loop.
If the returned integer is zero, then the next cycle in the run-loop should execute asynchronously.
Recommended batch size used for breaking synchronous loops in asynchronous batches.
Recommended batch size used for breaking synchronous loops in asynchronous batches. When streaming value from a producer to a synchronous consumer it's recommended to break the streaming in batches as to not hold the current thread or run-loop indefinitely.
This is rounded to the next power of 2, because then for applying the modulo operation we can just do:
val modulus = recommendedBatchSize - 1 // ... nr = (nr + 1) & modulus
For the JVM the default value can be adjusted with:
java -Dmonix.environment.batchSize=2048 \ ...
ExecutionModel specifying an mixed execution mode under which tasks are executed synchronously in batches up to a maximum size.
After a batch of tasks of the recommended size is executed, the next execution should be asynchronous, forked on a different logical thread.
By specifying the ExecutionModel.recommendedBatchSize, the configuration can be fine-tuned.