diff options
Diffstat (limited to 'doc/man/fqueue.3')
| -rw-r--r-- | doc/man/fqueue.3 | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/doc/man/fqueue.3 b/doc/man/fqueue.3 index 72a0bc25..f2fb8c9f 100644 --- a/doc/man/fqueue.3 +++ b/doc/man/fqueue.3 @@ -116,6 +116,27 @@ _ \fBfevent\fR() & Thread safety & MT-Safe .TE +.SH THREAD SAFETY +.BR fevent () +and +.BR flow_read () +on the same fd from distinct threads is well-defined but races: +events reported by +.BR fevent () +may already have been consumed by the racing +.BR flow_read (), +so the reader may then block. Same shape as +.BR select (2) ++ +.BR read (2) +from distinct threads. The intended pattern is that the thread +invoking +.BR fevent () +is the same thread that calls +.BR flow_read () +on the fds returned by +.BR fqueue_next (). + .SH TERMINOLOGY Please see \fBouroboros-glossary\fR(7). |
