View Source Zig.Nif.Concurrency behaviour (zigler v0.11.0)
behaviour module which describes the interface for "plugins" which generate concurrency-specific code.
Summary
Callbacks
returns "table_entry" tuples which are then used to generate the nif table. if a nif function needs multiple parts, for example, for concurrency management, then multiple entries should be returned.
Types
@type concurrency() :: :synchronous | :dirty_cpu | :dirty_io
@type table_entry() :: {name :: atom(), arity :: non_neg_integer(), function_pointer :: atom(), bootstrap :: concurrency()}
Callbacks
@callback table_entries(Zig.Nif.t()) :: [table_entry()]
returns "table_entry" tuples which are then used to generate the nif table. if a nif function needs multiple parts, for example, for concurrency management, then multiple entries should be returned.