phoenix_title 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 Class Hierarchy

Inheritance diagram for class ThreadEvent:

method_summary Methods Summary

__init__

Constructor.

Clone

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

Returns wxEVT_CATEGORY_THREAD .

GetExtraLong

Returns extra information integer value.

GetInt

Returns stored integer value.

GetString

Returns stored string value.

SetExtraLong

Sets the extra information value.

SetInt

Sets the integer value.

SetString

Sets the string value.


property_summary Properties Summary

EventCategory

See GetEventCategory

ExtraLong

See GetExtraLong and SetExtraLong

Int

See GetInt and SetInt

String

See GetString and SetString


api Class API

class 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.


Methods

__init__(self, eventType=wxEVT_THREAD, id=ID_ANY)

Constructor.

Parameters:
  • 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 ).

Return type:

wx.Event



GetEventCategory(self)

Returns wxEVT_CATEGORY_THREAD .

This is important to avoid unwanted processing of thread events when calling wx.EventLoopBase.YieldFor .

Return type:

wx.EventCategory



GetExtraLong(self)

Returns extra information integer value.

Return type:

long



GetInt(self)

Returns stored integer value.

Return type:

int



GetString(self)

Returns stored string value.

Return type:

string



SetExtraLong(self, extraLong)

Sets the extra information value.

Parameters:

extraLong (long) –



SetInt(self, intCommand)

Sets the integer value.

Parameters:

intCommand (int) –



SetString(self, string)

Sets the string value.

Parameters:

string (string) –


Properties

EventCategory

See GetEventCategory



ExtraLong

See GetExtraLong and SetExtraLong



Int

See GetInt and SetInt



String

See GetString and SetString