SourceMod SDK  1.7
SourceMod::IThreader Class Referenceabstract

Describes a threading system. More...

#include <public/IThreader.h>

Inheritance diagram for SourceMod::IThreader:
SourceMod::SMInterface SourceMod::IThreadCreator

Public Member Functions

virtual const char * GetInterfaceName ()
 Must return a string defining the interface's unique name.
 
virtual unsigned int GetInterfaceVersion ()
 Must return an integer defining the interface's version.
 
virtual bool IsVersionCompatible (unsigned int version)
 Must return whether the requested version number is backwards compatible. Note: This can be overridden for breaking changes or custom versioning. More...
 
virtual IMutexMakeMutex ()=0
 Creates a mutex (mutual exclusion lock). More...
 
virtual void ThreadSleep (unsigned int ms)=0
 Sleeps the calling thread for a number of milliseconds. More...
 
virtual IEventSignalMakeEventSignal ()=0
 Creates a non-signalled event. More...
 
virtual IThreadWorkerMakeWorker (IThreadWorkerCallbacks *hooks, bool threaded)=0
 Creates a thread worker. More...
 
virtual void DestroyWorker (IThreadWorker *pWorker)=0
 Destroys an IThreadWorker pointer. More...
 
- Public Member Functions inherited from SourceMod::IThreadCreator
virtual ~IThreadCreator ()
 
virtual void MakeThread (IThread *pThread)=0
 Creates a basic thread. More...
 
virtual IThreadHandleMakeThread (IThread *pThread, ThreadFlags flags)=0
 Creates a thread with specific options. More...
 
virtual IThreadHandleMakeThread (IThread *pThread, const ThreadParams *params)=0
 Creates a thread with specific options. More...
 
virtual void GetPriorityBounds (ThreadPriority &max, ThreadPriority &min)=0
 Returns the priority bounds. Note: On Linux, the min and max are both Thread_Normal. More...
 

Detailed Description

Describes a threading system.

Member Function Documentation

virtual void SourceMod::IThreader::DestroyWorker ( IThreadWorker pWorker)
pure virtual

Destroys an IThreadWorker pointer.

Parameters
pWorkerIThreadWorker pointer to destroy.
virtual bool SourceMod::IThreader::IsVersionCompatible ( unsigned int  version)
inlinevirtual

Must return whether the requested version number is backwards compatible. Note: This can be overridden for breaking changes or custom versioning.

Parameters
versionVersion number to compare against.
Returns
True if compatible, false otherwise.

Reimplemented from SourceMod::SMInterface.

virtual IEventSignal* SourceMod::IThreader::MakeEventSignal ( )
pure virtual

Creates a non-signalled event.

Returns
A new IEventSignal pointer (must be destroyed).
virtual IMutex* SourceMod::IThreader::MakeMutex ( )
pure virtual

Creates a mutex (mutual exclusion lock).

Returns
A new IMutex pointer (must be destroyed).
virtual IThreadWorker* SourceMod::IThreader::MakeWorker ( IThreadWorkerCallbacks hooks,
bool  threaded 
)
pure virtual

Creates a thread worker.

Parameters
hooksOptional pointer to callback interface.
threadedIf true, the worker will be threaded. If false, the worker will require manual frame execution.
Returns
A new IThreadWorker pointer (must be destroyed).
virtual void SourceMod::IThreader::ThreadSleep ( unsigned int  ms)
pure virtual

Sleeps the calling thread for a number of milliseconds.

Parameters
msMillisecond count to sleep.

The documentation for this class was generated from the following file: