[Iolib-devel] Thread Safe

Stelian Ionescu sionescu at cddr.org
Fri Oct 24 20:18:06 UTC 2014


On Fri, 2014-10-24 at 14:08 -0600, FAU wrote:
> Hello,
> 
> I'm curious about Iolib.  I've been looking into ways to do multiplexing
> IO in common lisp.  I know how I would do that in traditional (Unix) C
> via non-blocking IO and select().
> 
> I've admittedly not read the manual as of yet.  It seems that Iolib has
> something like an event loop which probably invokes user specified
> callbacks for IO ready streams/fds.
> 
> Now I'm wondering, is the event loop thread safe?

No, you'll have to come up with your own locking.


>   Is there still a way
> to use something like the traditional select() call (which basically
> means not to use the event loop and determine the readiness of
> stream/fds the old fashioned way)?

You mean, by returning a list of events ? No, although one thing you
could try is perform one-shot runs of the event loop, after which the
loop exits and you have to start it again. IOW, run your own loop
outside the multiplexer loop.

-- 
Stelian Ionescu a.k.a. fe[nl]ix
Quidquid latine dictum sit, altum videtur.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <https://mailman.common-lisp.net/pipermail/iolib-devel/attachments/20141024/47452a72/attachment.sig>


More information about the iolib-devel mailing list