SpatialOps
SpatialOps::Semaphore Struct Reference

Provide resource management for multithreaded situations. More...

#include <Semaphore.h>

Public Member Functions

 Semaphore (int initial=0)
 
void post ()
 release a resource
 
void wait ()
 Wait until a resource is available (a call to post is made).
 

Detailed Description

Provide resource management for multithreaded situations.

Implemented to replace boost::interprocess::interprocess_semaphore due to posix semaphores bug in glibc: http://sourceware.org/bugzilla/show_bug.cgi?id=12674

However, there are many more bugs in glibc! On some (non x86 / x86_64) platforms, this one could bite us: http://sourceware.org/bugzilla/show_bug.cgi?id=13690

Definition at line 20 of file Semaphore.h.

Constructor & Destructor Documentation

◆ Semaphore()

SpatialOps::Semaphore::Semaphore ( int  initial = 0)
inline
Parameters
initialthe initial number of resources available

Definition at line 26 of file Semaphore.h.


The documentation for this struct was generated from the following file: