freenode/#mezzano - IRC Chatlog
Search
16:30:03
froggey
you can call mailbox-n-pending-messages to check how many messages are currently in the mailbox, but they might be gone by the time you call mailbox-receive
16:35:06
froggey
if you do (if (mailbox-full-p mailbox) (discard connection) (mailbox-send connection)) then there's a race between the test and the send
16:35:56
froggey
the mailbox might become not-full between the test & send, then the connection would be discarded unnecessarily
16:46:54
froggey
I still don't understand. tcp-accept waits for the handshake to complete, the application never sees a connection before the handshake completes
16:47:27
froggey
you want the handshake to happen while the connection is sitting in the listener mailbox?
16:56:41
froggey
I think I get it. if the server doesn't call tcp-accept, then pending connections that are sitting in the listener mailbox should time out?
17:39:23
froggey
if you want to operate recursively on some datastructure, then I'd split the code into two functions: an internal function that must be called with the lock held and does the actual work, and an external function that just takes the lock and calls the internal function
17:47:00
froggey
you might want to set mezzano.supervisor::*lock-violations-are-fatal* to nil, then it'll be an error instead of a full panic