SliceO_Class Mutual Exclusion

 

When working with multi-thread systems, care must be taken to prevent 2 threads from working on the same frame at the same time.  In sliceOmatic this is done by using the "Lock_Get" and "Lock_Set" methods.

 

The SliceO_Class also has "Mutex_Open" and "Mutex_Close" methods, but these are for internal use by TomoVision (they are used among other things to implement the "Lock_Set"/"Lock_Get" methods) and should not be used in user modules.

 

private:

m_lock (int)

 

 

Public:

 

Lock_Set

 

Lock that prevent 2 thread from playing in the data at the same time.

 

Lock_Get

 

Return the value of the lock.  "1" is locked, "0" is unlocked.

 

private:

m_mutex (HANDLE)

 

Mutual exclusion handle

 

Public:

 

void          Mutex_Open( char *str )

 

Open the mutual exclusion (for TomoVision usage only)

 

void          Mutex_Close( char *str )

 

Close the mutual exclusion (for TomoVision usage only)