LaKraven / LKSL

LaKraven Studios Standard Library
http://otapi.com
Other
51 stars 15 forks source link

Implement Failover Lists for TLKEventContainer and its descendants #27

Closed LaKraven closed 9 years ago

LaKraven commented 9 years ago

At present, any OnEvent handler which attempts to register or unregister a Listener (or an Event Thread, an Event PreProcessor etc) will initiate a Deadlock. This can be avoided by simply checking if the Lock can be acquired, and if it cannot, placing the registration/unregistration instruction into a "Failover list" (a simple miniature Event Queue internal to the TLKEventContainer system itself) to be processed AFTER the OnEvent handler has completed.