<div><div dir="auto">What’s the underlying problem you’re trying to model?</div></div><div><br><div class="gmail_quote"><div dir="ltr">On Tue, Jan 8, 2019 at 3:56 AM Phyx <<a href="mailto:lonetiger@gmail.com">lonetiger@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>> 
<span class="m_-4415016079231801545gmail-im"></span>Oh, I see :(  I guess it's not that easy of a fix then.  Perhaps the RTS could use a new intrinsic for blocking on foreign state <br></div><div><br></div><div>Yeah, that's what I was/am currently working on, "IOPort" has much of the same property of MVar but doesn't have this deadlock guarantee and only supports a single put/take at a time.</div><div>But debugging CMM is... not fun :( so I was wondering if I was just missing something with the existing mechanisms.</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Jan 8, 2019 at 8:23 AM Phil Ruffwind <<a href="mailto:rf@rufflewind.com" target="_blank">rf@rufflewind.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> I did try removing this check to see, but it really didn't like that. It<br>
> caused GC to be triggered over and over again as the RTS tried desperately<br>
> to find something to do, doesn't seem to consider "do nothing" as a valid<br>
> state.<br>
<br>
Oh, I see :(  I guess it's not that easy of a fix then.  Perhaps the RTS could use a new intrinsic for blocking on foreign state.<br>
</blockquote></div>
_______________________________________________<br>
ghc-devs mailing list<br>
<a href="mailto:ghc-devs@haskell.org" target="_blank">ghc-devs@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a><br>
</blockquote></div></div>