zi_lib concurrency example
Can anyone explain to me how to use zi_lib concurr开发者_JS百科ency with classes?
You can look at the examples in
https://github.com/zlateski/zi_lib/tree/master/zi/concurrency/test
note that you don't have to use zi::run_fn, it's a backwards compatibility thing, you can say:
zi::thread t( zi::bind( function_pointer, arg1, arg2, ... ) ); t.start(); t.join();
same thing with the zi::task_manager::simple or zi::task_manager::deque.
the test have bunch of examples of how to use the synchronization classes/functions
精彩评论