Skip to content

leniseev/tokio-threadpool-blocking-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tokio threadpool blocking demo

In this demo Tokio thread_pool blocking feature is presented.

8 "heavy computation" blocking features are spawned, after which 8 non-blocing features are spawned too. Each blocking feature enters blocking environment and performs heavy computation for 1 second.

One can see that non-blocking features return before blocking ones, despite being started later.

Running

cargo run

About

Example of tokio threadpool blocking

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages