[Ecls-list] Nowait semaphore/mailbox diff review
Matthew Mondor
mm_lists at pulsar-zone.net
Tue Nov 5 05:26:49 UTC 2013
There are situations where it's useful to attempt to post a message
without blocking (where data loss is acceptable as for UDP), as well as
cases where it's useful to query an incomming port without blocking if
it's empty.
This diff implements:
MP:TRY-GET-SEMAPHORE: returns NIL if the semaphore could not be
obtained, or the count if it could
MP:MAILBOX-TRY-READ: returns a message if it's available, NIL if the
queue is empty
MP:MAILBOX-TRY-SEND: returns the sent message if it could be queued, or
NIL (mailbox is full)
I'm slightly worried about potential race conditions, this probably has
to be carefully reviewed.
Thanks,
--
Matt
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mp-diff.txt
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20131105/018d0390/attachment.txt>
More information about the ecl-devel
mailing list