mirror of
https://github.com/vlang/v.git
synced 2025-09-14 06:52:36 +03:00
20 lines
394 B
V
Executable file
20 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
|
|
}
|