#include <ZFProtocolZFThread.h>
Public Member Functions | |
| virtual const zfchar * | protocolName (void) const |
| get the name of the protocol module, e.g. "ZFObject" | |
| virtual void * | nativeThreadRegister (ZFThread *ownerZFThread)=0 |
| see ZFThread::nativeThreadUnregister | |
| virtual void | nativeThreadUnregister (void *token)=0 |
| see ZFThread::nativeThreadUnregister, nativeThreadRegister | |
| virtual ZFThread * | threadForToken (void *token)=0 |
| get thread from token created by nativeThreadRegister | |
| virtual ZFThread * | mainThread (void)=0 |
| see ZFThread::mainThread | |
| virtual ZFThread * | currentThread (void)=0 |
| see ZFThread::currentThread | |
| virtual void * | sleepTokenCreate (void) |
| see ZFThread::sleep | |
| virtual void | sleepTokenDestroy (void *sleepToken) |
| see ZFThread::sleep | |
| virtual zfbool | sleep (void *sleepToken, zftimet miliSecs) |
| see ZFThread::sleep | |
| virtual void | sleepCancel (void *sleepToken) |
| see ZFThread::sleep | |
| virtual zfbool | executeInMainThreadAvailable (void) |
| whether executeInMainThread available | |
| virtual void * | executeInMainThread (const ZFListener &runnable)=0 |
| run the runnable in main thread | |
| virtual void | executeInMainThreadCleanup (void *nativeToken)=0 |
| used to cleanup nativeToken | |
| virtual void * | executeInNewThread (const ZFListener &runnable, const ZFListener &runnableCleanup)=0 |
| run the runnable in new thread | |
| virtual void | executeInNewThreadCleanup (void *nativeToken)=0 |
| used to cleanup nativeToken | |
Public Member Functions inherited from ZFProtocol | |
| virtual void | protocolOnInit (void) |
| called to init the protocol | |
| virtual void | protocolOnInitFinish (void) |
| see protocolOnInit | |
| virtual void | protocolOnDeallocPrepare (void) |
| see protocolOnInit | |
| virtual void | protocolOnDealloc (void) |
| see protocolOnInit | |
| virtual ZFProtocolInstanceState | protocolInstanceState (void) |
| protocol instance's state | |
| virtual const zfchar * | protocolImplName (void) const |
| get the name of the protocol implementation, e.g. "ZFObject_default" | |
| virtual ZFProtocolLevel | protocolImplLevel (void) const |
| get the level of the protocol implementation | |
| virtual const zfchar * | protocolImplPlatformHint (void) const |
| get type hint of the implementation or empty string if not defined, e.g. "iOS:NSString" for iOS's string impl, use ZFPROTOCOL_IMPLEMENTATION_PLATFORM_HINT to register | |
| virtual void | objectInfoT (zfstring &ret) const |
| see objectInfo | |
| virtual zfstring | objectInfo (void) const |
| get a short info about this object | |
Protected Types | |
| typedef ZFProtocol | zfsuper |
| class ref to super | |
| typedef ZFPInterface_ZFThread | zfself |
| class ref to self | |
protocol for ZFThread
|
inlinevirtual |
get the name of the protocol module, e.g. "ZFObject"
Reimplemented from ZFProtocol.
|
pure virtual |
see ZFThread::nativeThreadUnregister
you should not retain or release ownerZFThread
|
pure virtual |
see ZFThread::nativeThreadUnregister, nativeThreadRegister
you should not retain or release ownerZFThread
|
pure virtual |
run the runnable in main thread
you should queue it to run even if current thread is main thread
|
pure virtual |
run the runnable in new thread
you must:
NOTE: the created thread may be blocked by semaphore to achieve app level thread pool logic