PaCO++  0.05
paco_omni_fabrique Class Reference

#include <paco_omni.h>

Inheritance diagram for paco_omni_fabrique:
Collaboration diagram for paco_omni_fabrique:

List of all members.

Public Member Functions

paco_conditionpaco_create_condition (paco_mutex *mutex)
paco_mutexpaco_create_mutex ()
paco_threadpaco_create_thread (void *(*fn)(void *), void *arg=NULL)
paco_threadpaco_create_thread (void(*fn)(void *), void *arg=NULL)

Detailed Description

Definition at line 39 of file paco_omni.h.


Member Function Documentation

Implements paco_fabrique_thread.

Definition at line 60 of file paco_omni.cc.

{
  return new paco_omni_condition((paco_omni_mutex*) mutex);
}

Implements paco_fabrique_thread.

Definition at line 55 of file paco_omni.cc.

{
  return new paco_omni_mutex();
}
paco_thread * paco_omni_fabrique::paco_create_thread ( void *(*)(void *)  fn,
void *  arg = NULL 
) [virtual]

Implements paco_fabrique_thread.

Definition at line 65 of file paco_omni.cc.

{
  //  paco_omni_thread * th = new paco_omni_thread();
  // to have a detached thread !
  void (*fn_detached)(void*) = (void (*)(void *))fn;
  //th->thread = omni_thread::create(fn_detached,arg);
   try
    {
  omni_thread::create(fn_detached,arg);
   }
  catch (omni_thread_fatal &e)
    {
      int end = 0;
      while (end != 1)
   {
     cerr << "paco_create_thread error : " << e.error << endl;
     end = end + 1;
     omni_thread::sleep(2);
     try
       {
         omni_thread::create(fn_detached,arg);
       }
     catch (omni_thread_fatal &e)
       {
         end = end - 1;
       }
   }
    }
  //return th;
  return NULL;
}
paco_thread * paco_omni_fabrique::paco_create_thread ( void(*)(void *)  fn,
void *  arg = NULL 
) [virtual]

Implements paco_fabrique_thread.

Definition at line 97 of file paco_omni.cc.

{
  try
    {
      omni_thread::create(fn,arg);
    }
  catch (omni_thread_fatal &e)
    {
      int end = 0;
      while (end != 1)
   {
     cerr << "paco_create_thread error : " << e.error << endl;
     end = end + 1;
     omni_thread::sleep(2);
     try
       {
         omni_thread::create(fn,arg);
       }
     catch (omni_thread_fatal &e)
       {
         end = end - 1;
       }
   }
    }
  return NULL;
}

The documentation for this class was generated from the following files: