PIThreadPoolExecutor & PIBlockingDequeue improvements
- add support move & copy semantic - introduce submit method for executor with future result
This commit is contained in:
@@ -4,11 +4,19 @@
|
||||
#include "pithread.h"
|
||||
#include <atomic>
|
||||
|
||||
template<typename T>
|
||||
void print_type_info() {
|
||||
std::cout << typeid(T).name() << " is a "
|
||||
<< (std::is_const<typename std::remove_reference<T>::type>::value ? "const " : "")
|
||||
<< (std::is_lvalue_reference<T>::value ? "lvalue" : "rvalue")
|
||||
<< " reference" << std::endl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Minimum wait thread start, switch context or another interthread communication action time. Increase it if tests
|
||||
* write "Start thread timeout reach!" message. You can reduce it if you want increase test performance.
|
||||
*/
|
||||
const int WAIT_THREAD_TIME_MS = 10;
|
||||
const int WAIT_THREAD_TIME_MS = 30;
|
||||
|
||||
const int THREAD_COUNT = 2;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user