wx.ThreadEvent¶This class adds some simple functionality to wx.Event to facilitate inter-thread communication.
This event is not natively emitted by any control/class: it is just a helper class for the user. Its most important feature is the GetEventCategory implementation which allows thread events NOT to be processed by wx.EventLoopBase.YieldFor calls (unless the wxEVT_CATEGORY_THREAD is specified - which is never in code).
New in version 2.9.0.
See also
Multithreading Overview, wx.EventLoopBase.YieldFor
Class Hierarchy¶
Inheritance diagram for class ThreadEvent:

Methods Summary¶Constructor. |
|
Clones this event making sure that all internal members which use |
|
Returns |
|
Returns extra information integer value. |
|
Returns stored integer value. |
|
Returns stored string value. |
|
Sets the extra information value. |
|
Sets the integer value. |
|
Sets the string value. |
Properties Summary¶See |
|
See |
|
Class API¶wx.ThreadEvent(Event)¶Possible constructors:
ThreadEvent(eventType=wxEVT_THREAD, id=ID_ANY)
This class adds some simple functionality to Event to facilitate inter-thread communication.
__init__(self, eventType=wxEVT_THREAD, id=ID_ANY)¶Constructor.
eventType (wx.EventType) –
id (int) –
Clone(self)¶Clones this event making sure that all internal members which use COW (only m_commandString for now; see Reference Counting) are unshared (see wx.Object.UnShare ).
GetEventCategory(self)¶Returns wxEVT_CATEGORY_THREAD .
This is important to avoid unwanted processing of thread events when calling wx.EventLoopBase.YieldFor .
GetExtraLong(self)¶Returns extra information integer value.
long
GetInt(self)¶Returns stored integer value.
int
GetString(self)¶Returns stored string value.
string
SetExtraLong(self, extraLong)¶Sets the extra information value.
extraLong (long) –
SetInt(self, intCommand)¶Sets the integer value.
intCommand (int) –
SetString(self, string)¶Sets the string value.
string (string) –
EventCategory¶See GetEventCategory
ExtraLong¶See GetExtraLong and SetExtraLong