[racket] scheme_call_enable_break

From: Laurent (laurent.orseau at gmail.com)
Date: Mon Apr 22 03:35:44 EDT 2013

Thanks for you answer Diogo, it actually made me think that I could use
`sync/timeout' instead of trying to poll directly:
(sync/timeout 0 (scheme_fd_to_semaphore s MZFD_CREATE_READ #t))

Unfortunately this does not work :)
It always returns #f.
I tried with MZFD_CHECK_READ instead, but got a segfault.

Probably I should wait for the documentation of `scheme_fd_to_semaphore'
then.

Laurent


On Sun, Apr 21, 2013 at 9:49 PM, Diogo F. S. Ramos <diogofsr at gmail.com>wrote:

> Laurent <laurent.orseau at gmail.com> writes:
>
> > In particular, I'd like to use it with shawnpresser's unix domain socket
> package [2] and its `accept' function, but I'm not sure how to make one
> work with the other.
>
> Writing more about how to deal with the unix domain socket blocking,
> this is how I do it: I make an input port from the socket using
> `scheme_make_fd_input_port' and I use `sync' with this input-port to
> accept connections.  When `sync' returns I know there is something
> waiting to be accepted.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20130422/37a80d35/attachment.html>

Posted on the users mailing list.