<div dir="ltr">I think that you roll your own syncronization primitive, instead of using an async-channel. Create a thread and have a little loop that gets whatever the events you want to support (e.g., get, put, is-full?) and then work directly at this level. This is the beauty of CML; writing such things is easy.<div>
<br></div><div>Robby</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Nov 29, 2013 at 2:23 PM, Eric Dobson <span dir="ltr"><<a href="mailto:eric.n.dobson@gmail.com" target="_blank">eric.n.dobson@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'm trying to make a custom output port that is backed by a<br>
async-channel. One of the operations that ports need to provide is an<br>
event that is ready when progress on the event can be made. But since<br>
I cannot tell if the async-channel is full and put would not block<br>
without actually sending a value, I cannot provide such an event. Is<br>
it possible to provide such an API or does the implementation of<br>
async-channels prevent this?<br>
____________________<br>
Racket Users list:<br>
<a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
</blockquote></div><br></div>