You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Indeed, seems that during switch to tokio configuring .threads is basically useless or at least doesnt' work correctly.
serve function that in the original design was supposed to be running an event loop and block the thread is currently just spawning a task to executor.
Executor is configured to run in number of threads that depend on number of cores and for your system it seems to be 2.
And we also start a completely useless thread that just waits for the tokio::runtime to finish when we spawn the Reactor.
If I don't mention the amount of threads or if I put
.threads(1)
I still see that there are 2 different threads operating.Example code:
Output:
As You can see there's threadID 2 and 3, (
jsonrpc-eventloop-0
andjsonrpc-eventloop-1
) both operate within the code of the server.cc #423 @tomusdrw
The text was updated successfully, but these errors were encountered: