-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement experimental fix for GHCJS weak pointers
- Loading branch information
1 parent
3ac2dfc
commit 211e221
Showing
1 changed file
with
4 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
211e221
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi!
Just tried it, but it produces the same result for me, as with the head branch => It stops working after ~2 secs (aka when the GC) did run.
P.S. I created a patch here for the ghcjs runtime (shims) which fixes it by trying to restore the ghc seamntics, but it might be stil buggy and/or memory leaking (haven't worked on the ghcjs rts so far), but at least it seems to solve the problem for me with that FRP event propagation stops after GC run. But I also like the idea of exploring if there could be a fix on the reactive-banana side which works with the current semantics the ghcjs runtime implements for weak pointers.
211e221
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw if it turns out that there is an easy "fix" which makes reactive-banana compatible with the current semantics of the ghcjs runtime, it might be useful to integrated it till ghcjs and ghc have the same semantics (what should obviously the final goal).
Just for documentation, if such a patch exists, but should not be used in the native code, you could use the preprocessor to automaticly select the wanted implementation depending of compiled with native ghc or ghcjs with
#if defined(ghcjs_HOST_OS) ...
211e221
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I had tried to implement the workaround that Luite suggested, but apparently misread it:
In line 57, the
touch
has to be applied tob
, not toa
. I'll make another attempt.