Here's a sample stack trace of resolving a Deferred in a function called by haxe.Timer.delay:
java.lang.NullPointerException
at haxe.root.List.pop(Unknown Source)
at promhx.base.EventLoop_continueOnNextLoop_55__Fun.__hx_invoke0_o(Unknown Source)
at promhx.base.EventLoop.continueOnNextLoop(Unknown Source)
at promhx.base.AsyncBase._resolve(Unknown Source)
at promhx.base.AsyncBase.handleResolve(Unknown Source)
at promhx.Deferred.resolve(Unknown Source)
This change uses java.vm.AtomicList instead of List, but makes it impossible to implement queueLength without locking. Instead, I replaced it with queueEmpty.
Haxe's
List
class is not thread-safe.Here's a sample stack trace of resolving a Deferred in a function called by
haxe.Timer.delay
:This change uses
java.vm.AtomicList
instead ofList
, but makes it impossible to implementqueueLength
without locking. Instead, I replaced it withqueueEmpty
.