This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
api:thread [2017/12/02 09:55] payonel [Thread API] |
api:thread [2017/12/02 10:05] payonel [Event Registration Independence] |
||
---|---|---|---|
Line 21: | Line 21: | ||
====Event Registration Independence==== | ====Event Registration Independence==== | ||
- | A thread maintains an independent set of event registrations. Any event registration made (e.g. listeners or timers) inside a thread belongs to that thread. | + | A thread maintains an independent set of event registrations; it does not inherit any and it does not share any. Any event registration made (e.g. listeners or timers) inside a thread belongs to that thread. |
* When a thread dies all of its event registrations die with it. | * When a thread dies all of its event registrations die with it. | ||
* A `suspended` thread ignores events (see `t:status() suspended`) | * A `suspended` thread ignores events (see `t:status() suspended`) | ||
* A thread cannot access/remove/interfere with another thread's event registrations. | * A thread cannot access/remove/interfere with another thread's event registrations. | ||
* A pushed event is observed by all running threads on the system. | * A pushed event is observed by all running threads on the system. | ||
+ | * Two separate threads can `event.pull` for the same event, and each thread will observe the event independently. | ||
===== Overview ===== | ===== Overview ===== | ||