Closed agentgt closed 5 years ago
Please read the Scheduler JavaDocs.
The so-called Scheduler.Workers of a Scheduler can be created via the createWorker() method which allow the scheduling of multiple Runnable tasks in an isolated manner. Runnable tasks scheduled on a Worker are guaranteed to be executed sequentially and in a non-overlapping fashion. Non-delayed Runnable tasks are guaranteed to execute in a First-In-First-Out order but their execution may be interleaved with delayed tasks. In addition, outstanding or running tasks can be cancelled together via Disposable.dispose() without affecting any other Worker instances of the same Scheduler.
Yes but that is the RxJava documentation of which I'm familiar with and is far more clear. I just thought it might be worthwhile to put something similar in this project.
Edit: what I meant by rxjava "not mentioning" meaning it does not have that guarantee... not that it doesn't explain the interleaving... sorry my mistake for saying that. RxJava has excellent documentation.
This project is no longer developed and we applied the knowledge and further clarifications in the respective libraries long ago.
The
Scheduler.Worker#schedule
javadoc says:The FIFO order seems to be preserved in all of the code examples but I don't understand the semantics being used for "strictly non-concurrently".
For example it appears ExecutorServiceScheduler will have Workers that will run tasks concurrently unless a single thread executor is used.
In other Reactive Streams implementations that have a scheduler aka rxjava there is no mention of that guarantee.
Is there some implementation logic I'm missing or am I misunderstanding the doc?