docs/release-3-8-0.html
This releases (1) enhances the scheduling performance through C++20 atomic notification and a bounded queue strategy and (2) revised the semaphore model for better runtime control.
Taskflow 3.8.0 can be downloaded from here.
To use Taskflow v3.8.0, you need a compiler that supports C++17:
Taskflow works on Linux, Windows, and Mac OS X.
# compile your taskflow program with C++20 enabled~$ g++ -std=c++20 my_taskflow.cpp
tf::Executor executor(8);// create an executor of 8 workerstf::Taskflow taskflow;tf::Semaphore semaphore(1); // create a semaphore with initial count 1for(size\_t i=0; i\<1000; i++) {taskflow.emplace([&](tf::Runtime& rt){ rt.acquire(semaphore);std::cout \<\< "critical section here (one worker here only)\n"; critical\_section();rt.release(semaphore);});}executor.run(taskflow).wait();
Please do not hesitate to contact Dr. Tsung-Wei Huang if you intend to collaborate with us on using Taskflow in your scientific computing projects.