21 paco_fabrique_thread::paco_fabrique_thread() {}
24 void paco_fabrique_thread::paco_register(
const string& lib_thread, paco_individual_fabrique_thread * pift) {
26 thread_map_t::iterator it = _thread_map.find(lib_thread);
28 if (it == _thread_map.end() ) {
29 _thread_map[lib_thread] = pift;
31 cerr <<
"Ignoring: already register thread lib " << lib_thread << endl;
39 thread_map_t::iterator it = _thread_map.find(lib_thread);
41 if (it == _thread_map.end() ) {
42 cerr <<
"Not found thread lib " << lib_thread << endl;
46 return it->second->paco_create_mutex();
53 thread_map_t::iterator it = _thread_map.find(lib_thread);
55 if (it == _thread_map.end() ) {
56 cerr <<
"Not found thread lib " << lib_thread << endl;
60 return it->second->paco_create_condition((
paco_mutex*) mutex);
66 thread_map_t::iterator it = _thread_map.find(lib_thread);
68 if (it == _thread_map.end() )
70 cerr <<
"Not found thread lib " << lib_thread << endl;
75 return it->second->paco_create_thread(fn, arg);
81 thread_map_t::iterator it = _thread_map.find(lib_thread);
83 if (it == _thread_map.end() )
85 cerr <<
"Not found thread lib " << lib_thread << endl;
90 return it->second->paco_create_thread(fn, arg);
virtual paco_thread * paco_create_thread(void *(*fn)(void *), void *arg=NULL)=0
virtual ~paco_condition()
virtual paco_mutex * paco_create_mutex()=0
virtual paco_condition * paco_create_condition(paco_mutex *mutex)=0
virtual ~paco_fabrique_thread()