7 #ifndef __netsignal_Spool_h__ 8 #define __netsignal_Spool_h__ 33 unsigned int size(
void);
36 Mutex::Condition m_readAvailable;
37 std::queue<sp<T> > m_spool;
55 Mutex::Guard guard(m_monitor);
60 spT = m_spool.front();
70 Mutex::Guard guard(m_monitor);
71 return m_spool.size();
77 Mutex::Guard guard(m_monitor);
79 while(m_spool.empty())
91 m_readAvailable.wait(guard);
95 sp<T> spT = m_spool.front();
103 Mutex::Guard guard(m_monitor);
106 m_readAvailable.notifyAll();
112 Mutex::Guard guard(m_monitor);
119 "unsafe to retain references to objects put into Spool");
124 m_readAvailable.notifyOne();
kernel
Definition: namespace.dox:3
Thread safe data queue.
Definition: Spool.h:21
Death pill for threads.
Definition: Poison.h:15
An exception to be thrown when active Poison has been detected.
Definition: Poison.h:30
Base for all interfacable components.
Definition: Component.h:20
Intrusive Smart Pointer.
Definition: src/core/ptr.h:53
void put(T *pT)
Argument is a raw pointer instead of a sp<> because it may be unsafe to retain references to an objec...
Definition: Spool.h:110