Struct anira::SyncToken#
-
struct SyncToken : public anira_sync_token#
Inheritance diagram for anira::SyncToken:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"1" [label="anira::SyncToken" tooltip="anira::SyncToken" fillcolor="#BFBFBF"]
"2" [label="anira_sync_token" tooltip="anira_sync_token"]
"1" -> "2" [dir=forward tooltip="public-inheritance"]
}](../../_images/graphviz-a2faf4b93928c29bfba6c7addf74c18d8d6d0c57.png)
Collaboration diagram for anira::SyncToken:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"1" [label="anira::SyncToken" tooltip="anira::SyncToken" fillcolor="#BFBFBF"]
"2" [label="anira_sync_token" tooltip="anira_sync_token"]
"1" -> "2" [dir=forward tooltip="public-inheritance"]
}](../../_images/graphviz-a2faf4b93928c29bfba6c7addf74c18d8d6d0c57.png)
anira_sync_token with its two calls on it: the same 24-byte C struct, no member added, so a SyncToken* is an anira_sync_token*.
Not an RAII type: the token travels inside a trivially copyable anira_tensor and every hand-off is a transfer, so reset() is explicit. Both calls are [thread-safe, !audio-thread]: close and dup are system calls.
Public Functions
-
inline void reset() noexcept#
Closes the fd of an owning kind and zeroes the token (anira_sync_token_reset).
-
inline SyncToken dup() const#
A duplicate that outlives its source (anira_sync_token_dup): dup() for the two owning fd kinds, a plain copy otherwise. Throws anira::Error when the fd cannot be duplicated.
-
inline void reset() noexcept#