Derived from: none
Declared in: ThreadCaffeine.h
Library: libHTTP.so
The ThreadCaffeine class can be used to wakeup a thread which has been blocking too long. I created it because the Network Kit is still buggy and can block indefinetly on io requests. Especially if the remote closes the connection in the middle of an io task. While this wakes up the threads which employ the ThreadCaffeine, allowing them to calls closesocket() and exit gracefully, often the threads in the Net Server still don't wakeup and after calling closesocket(). This leads to a buildup of zombie threads in the Net Server and can eventually lead to the death of the Net Server. Hopefully all of this will be fixed soon. Right? Then we will no longer need lame hacks like ThreadCaffeine.
ThreadCaffeine( bigtime_t sleep = 10000000 )
virtual ~ThreadCaffeine( void )
status_t SetTeam( team_id team )
thread_id Run( void )
status_t Quit( void )
status_t AddThread( const char *thread_name ) status_t AddThread( thread_id thread, bigtime_t timeout )
status_t RemoveThread( thread_id thread )
void WaitForThreads( bool wake )