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).
Added in version 2.9.0.
See also
Multithreading Overview, wx.EventLoopBase.YieldFor
Class Hierarchy¶
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¶
- class wx.ThreadEvent(Event)¶
Possible constructors:
ThreadEvent(eventType=wxEVT_THREAD, id=ID_ANY) -> None
This class adds some simple functionality to Event to facilitate inter-thread communication.
Methods¶
- __init__(self, eventType=wxEVT_THREAD, id=ID_ANY)¶
Constructor.
- Parameters:
eventType (wx.EventType)
id (int)
- Return type:
None
- Clone(self)¶
Clones this event making sure that all internal members which use
COW
(onlym_commandString
for now; see Reference Counting) are unshared (seewx.Object.UnShare
).- Return type:
- GetEventCategory(self)¶
Returns
wxEVT_CATEGORY_THREAD
.This is important to avoid unwanted processing of thread events when calling
wx.EventLoopBase.YieldFor
.- Return type:
- GetExtraLong(self)¶
Returns extra information integer value.
- Return type:
int
- GetInt(self)¶
Returns stored integer value.
- Return type:
int
- GetString(self)¶
Returns stored string value.
- Return type:
str
- SetExtraLong(self, extraLong)¶
Sets the extra information value.
- Parameters:
extraLong (long)
- Return type:
None
- SetInt(self, intCommand)¶
Sets the integer value.
- Parameters:
intCommand (int)
- Return type:
None
- SetString(self, string)¶
Sets the string value.
- Parameters:
string (string)
- Return type:
None
Properties¶
- EventCategory¶
See
GetEventCategory
- ExtraLong¶
See
GetExtraLong
andSetExtraLong