quickwit
quickwit copied to clipboard
Configurable runtime
This PR changes a notch the way the selection fo the tokio runtime works.
Rather than spawning a local thread tokio runtime per blocking actor, they run all on the same tokio runtime. The actor framework just exposes this as a method in the Actor trait that makes it possible to customize on which runtime an actor should run.
As a side-effect this PR simplified the code, as we do not need a specific JoinHandle anymore, and different unit test for the two types of runtime.
For blocking actors, tokio is then used as a regular but very sophisticated thread pool. (task can be cancelled, it has work stealing, ...).
This PR is sufficient to run 100 small indexes without any trouble.