1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
v/vlib/builtin/chan.v
2020-09-05 01:36:20 +02:00

21 lines
394 B
V
Executable File

module builtin
enum ChanState {
success
not_ready // push()/pop() would have to wait, but no_block was requested
closed
}
// The following methods are only stubs. The real implementation
// is in `vlib/sync/channels.v`
pub fn (ch chan) close() {}
pub fn (ch chan) try_pop(obj voidptr) ChanState {
return .success
}
pub fn (ch chan) try_push(obj voidptr) ChanState {
return .success
}