8 #ifndef ASYNCHRONOUSTOOLS_H_
9 #define ASYNCHRONOUSTOOLS_H_
126 void broadcast () __attribute__ ((deprecated)) ;
127 void signal () __attribute__ ((deprecated)) ;
168 typedef void * (* ThreadFunction) (
void *);
173 pthread_t
getId ()
const;
183 virtual void *
run () = 0;
219 void log (
const char * format, ...);
221 void start (
const char * logFilename);
233 void log (
const string & text);
Logger & operator=(const Logger &)=delete
map< pthread_t, casacore::String > ThreadNames
void log (char * format,...); void setLogFilename (char * logFilename); void terminate (); ...
std::unique_lock< std::mutex > uniqueLock_p
Semaphore(int initialValue=0)
void unlock()
casacore::Bool lock (casacore::Int milliseconds);
volatile bool terminationRequested_p
LockGuardInverse(Mutex &mutex)
void lock()
casacore::Bool isLockedByThisThread () const; // for debug purposes only !!!
void log(const string &text)
void signal() __attribute__((deprecated))
void registerName(const casacore::String &threadName)
void wait(UniqueLock &uniqueLock)
static Logger * singleton_p
void start(const char *logFilename)
bool isTerminationRequested() const
Semaphore operator=(const Semaphore &other)
bool Bool
Define the standard types used by Casacore.
MutexLocker & operator=(const MutexLocker &other)
ThreadNames threadNames_p
void acquirelock()
jagonzal: Useful when mandatory is locking
void broadcast() __attribute__((deprecated))
static void * threadFunction(void *)
casacore::String logFilename_p
std::ostream * logStream_p
void log(const char *format,...)
MutexLocker(Mutex &mutex)
Mutex operator=(const Mutex &other)
queue< std::string > outputQueue_p
String: the storage and methods of handling collections of characters.
ConditionImpl * impl_p
casacore::Bool wait (Mutex & mutex, int milliseconds);
virtual ~LockGuardInverse()
void setLogFilename(const casacore::String &filename)
LoggerThread * loggerThread_p
Condition loggerChanged_p