purescript-event
purescript-event copied to clipboard
Removes the use of unsafeRefEq.
Hello,
This removes the use of unsafeRefEq
.
In its place, it generates a unique integer per subscriber which is used to delete the subscriber when the cancellation function is called. Note that the integer may not be unique if two subscribers subscribe at the same time and/or if the integer overflows but that would be a considerable amount of subscribers. Another solution would be purescript-uuid at the cost of additional time, space, dependencies, and FFI.
This will help out the PureScript Native C++ back end and possibility others.
:+1: