NTHM_TRUNCATE_ALL (3)
NTHM MANUAL
NTHM_TRUNCATE_ALL (3)
NAME
nthm_truncate_all - request truncation of all locally tethered treads
SYNOPSIS
#include <nthm/nthm.h>
void
nthm_truncate_all
(
int
*err
)
DESCRIPTION
The
nthm_truncate_all
function informs all threads created with
nthm_open
in the current thread's context
or tethered to it with
nthm_tether
that they should return a result sooner than usual by computing an
approximate solution.
The semantics of
nthm_truncate_all
is similar to that of calling
nthm_truncate
individually for each tethered thread
with these differences.
-
Truncation is also indicated for the caller's thread. That is,
subsequent calls to
nthm_truncated
within the same thread context as the caller will report a truncated
status.
-
If a source thread is truncated both individually and as a result of
nthm_truncate_all
being called in its drain's context, the individual degree of
truncation takes precedence when reported by
nthm_truncated
within the source thread's context.
-
If a source thread truncated due to
nthm_truncate_all
being called in its drain's context is subsequently untethered before
terminating, its truncation is undone.
-
If an untethered source thread is subsequently tethered to a drain
in whose context
nthm_truncate_all
was previously called, the source becomes truncated.
See the manual page of
nthm_truncate
for further details.
RETURN VALUE
none
ERRORS
Error codes are reported in the
*err
parameter.
Any other error code not present intially indicates either a bug in
nthm
or a misuse of the API. Bug reports are appreciated.
-
If
*err
is non-zero on entry,
then it remains unchanged.
-
If
*err
is zero on entry and non-zero on exit,
then an internal consistency check has failed.
SEE ALSO
nthm,
nthm_open,
nthm_read,
nthm_send,
nthm_select,
nthm_read.
nthm_truncate,
nthm_truncated,
nthm_blocked,
nthm_kill,
nthm_kill_all,
nthm_killed,
nthm_untether,
nthm_tether,
nthm_strerror,
nthm_busy,
nthm_sync
AUTHOR
Dennis Furey
(milonga@delayinsensitive.com)
PROJECT PAGE
https://github.com/gueststar/nthm
NTHM VERSION 0.10.14
May 17, 2024
NTHM_TRUNCATE_ALL (3)