package core:sync/chan
⌘K
Ctrl+K
or
/
Index
Constants (0)
This section is empty.
Variables (0)
This section is empty.
Procedures (27)
Procedure Groups (2)
Types
Chan ¶
Chan :: struct($T: typeid, $D: Direction = Direction.Both) {}
Related Procedures With Parameters
- as_recv
- as_send
- create_buffered
- create_unbuffered
- recv
- send
- try_recv
- try_send
- create (procedure groups)
Direction ¶
Direction :: enum int { Send = -1, Both = 0, Recv = 1, }
Raw_Chan ¶
Raw_Chan :: struct { // Shared allocator: runtime.Allocator, allocation_size: int, msg_size: u16, closed: b16, // atomic mutex: sync.Mutex, r_cond: sync.Cond, w_cond: sync.Cond, r_waiting: int, // atomic w_waiting: int, // Buffered queue: ^Raw_Queue, // Unbuffered r_mutex: sync.Mutex, w_mutex: sync.Mutex, unbuffered_data: rawptr, }
Related Procedures With Parameters
- can_recv
- can_send
- cap
- close
- destroy
- is_buffered
- is_closed
- is_unbuffered
- len
- recv_raw
- send_raw
- try_recv_raw
- try_send_raw
Related Procedures With Returns
- create_raw_buffered
- create_raw_unbuffered
- create_raw (procedure groups)
Raw_Queue ¶
Related Procedures With Parameters
Constants
This section is empty.
Variables
This section is empty.
Procedures
create_buffered ¶
create_buffered :: proc($C: typeid/Chan($T, $D=0), #any_int cap: int, allocator: runtime.Allocator) -> (c: $/Chan($T, $D=0), err: runtime.Allocator_Error) {…}
create_raw_buffered ¶
create_raw_buffered :: proc(#any_int msg_size, #any_int msg_alignment: int, #any_int cap: int, allocator: runtime.Allocator) -> (c: ^Raw_Chan, err: runtime.Allocator_Error) {…}
create_raw_unbuffered ¶
create_raw_unbuffered :: proc(#any_int msg_size, #any_int msg_alignment: int, allocator: runtime.Allocator) -> (c: ^Raw_Chan, err: runtime.Allocator_Error) {…}
create_unbuffered ¶
create_unbuffered :: proc($C: typeid/Chan($T, $D=0), allocator: runtime.Allocator) -> (c: $/Chan($T, $D=0), err: runtime.Allocator_Error) {…}
destroy ¶
destroy :: proc(c: ^Raw_Chan) -> (err: runtime.Allocator_Error) {…}
Procedure Groups
create ¶
create :: proc{ create_unbuffered, create_buffered, }
create_raw ¶
create_raw :: proc{ create_raw_unbuffered, create_raw_buffered, }
Source Files
Generation Information
Generated with odin version dev-2024-09 (vendor "odin") Windows_amd64 @ 2024-09-07 21:12:27.576501400 +0000 UTC