Re: make-output-port events

Matthew Flatt <mflatt-sDh8Nw2yj/[email protected]>
Newsgroups gmane.comp.lang.racket.user,gmane.lisp.scheme.plt
Message-ID <[email protected]>
Hi Curtis,

At Fri, 28 Dec 2018 21:22:16 -0500, Curtis Dutton wrote:
> I'm trying to create an output port that wraps a set of foreign interface
> functions.
> 
> The ffi has a bytes_writable function which tells how many bytes can be
> written as well as a write_bytes function that does the writing.
> 
> In this case I need to poll with bytes_writable until it returns more than
> 0 before I can make the event ready.
> 
> what is a good way to implement the event?

Use `unsafe-poller` from `ffi/unsafe/schedule`.


Matthew

-- 
You received this message because you are subscribed to the Google Groups "Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
For more options, visit https://groups.google.com/d/optout.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.