Thread which processes WorkItems in it's WorkItemQueue. More...
#include <thread.h>
Inherits Thread.

Public Member Functions | |
| void | DoWork (WorkItem *item, int priority=0, bool toBeDeleted=true) |
| Adds a new WorkItem to the queue. | |
| void * | Entry () |
| Overrides wxThread::Entry, thread entry point. | |
| ExitCode | Wait () |
| overrides wxThread::Wait . Wakes up from sleep if sleeping, to prevent delay. | |
| bool | Sleep (int milliseconds) |
| returns false when woken up | |
| void | WakeUp () |
| call this from outside thread to wake up Sleep - ing thread | |
| bool | TestDestroy () |
| overrides wxThread::TestDestroy , which can fail on Wait | |
| wxThreadError | Run () |
Protected Attributes | |
| wxSemaphore | m_thread_sleep_semaphore |
| bool | m_must_exit |
| workaround for old wxWidgets bug | |
Private Member Functions | |
| void | CleanupWorkItem (WorkItem *item) |
Private Attributes | |
| WorkItemQueue | m_workItems |
Thread which processes WorkItems in it's WorkItemQueue.
Definition at line 121 of file thread.h.
| void WorkerThread::CleanupWorkItem | ( | WorkItem * | item | ) | [private] |
Definition at line 210 of file thread.cpp.
| void WorkerThread::DoWork | ( | WorkItem * | item, | |
| int | priority = 0, |
|||
| bool | toBeDeleted = true | |||
| ) |
Adds a new WorkItem to the queue.
Definition at line 167 of file thread.cpp.
| void * WorkerThread::Entry | ( | ) |
Overrides wxThread::Entry, thread entry point.
Definition at line 176 of file thread.cpp.
| wxThreadError Thread::Run | ( | ) | [inherited] |
Definition at line 100 of file thread.cpp.
| bool Thread::Sleep | ( | int | milliseconds | ) | [inherited] |
returns false when woken up
Definition at line 85 of file thread.cpp.
| bool Thread::TestDestroy | ( | ) | [inherited] |
overrides wxThread::TestDestroy , which can fail on Wait
Reimplemented in HttpDownloaderThread< ParentClass >, TorrentMaintenanceThread, and HttpDownloaderThread< UpdaterClass >.
Definition at line 105 of file thread.cpp.
| Thread::ExitCode Thread::Wait | ( | ) | [inherited] |
overrides wxThread::Wait . Wakes up from sleep if sleeping, to prevent delay.
Definition at line 94 of file thread.cpp.
| void Thread::WakeUp | ( | ) | [inherited] |
call this from outside thread to wake up Sleep - ing thread
Definition at line 90 of file thread.cpp.
bool Thread::m_must_exit [protected, inherited] |
wxSemaphore Thread::m_thread_sleep_semaphore [protected, inherited] |
WorkItemQueue WorkerThread::m_workItems [private] |
1.6.3