Age | Commit message (Collapse) | Author |
|
Storing commands in OS socket buffers caused whole lot of
problems when free space in the buffer ran out. This patch
stores commands in ypipes instead and uses socketpair just
to signal the other thread, ie. at most one byte is stored
in the socketpair at any single instant.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
For the platforms that don't support MSG_DONTWAIT the reader
socket in mailbox_t was kept in non-blocking state and flipped
to blocking state and back when blocking read was requested.
Now, the state is preserved between calls and flipped only
if different type of operation (block vs. non-block) is
requested.
Signed-off-by: Fabien Ninoles <fabien@tzone.org>
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
- Add doc and tests
- Add options and setup
- Wait using poll/select
Signed-off-by: Fabien Ninoles <fabien@tzone.org>
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
For historical reasons queue to transfer commands between
threads was called 'signaler'. Given that it was used to
pass commands rather than signals it was renamed to 'mailbox',
see Erlang mailboxes.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|