mirror of
https://github.com/vlang/v.git
synced 2025-09-08 14:51:53 -04:00
sync: use -d debug_channels
instead of just -g
to turn on assertions in sync.channel_select (cleaner -cross code)
This commit is contained in:
parent
d515eb0dfa
commit
14618a1b18
@ -550,7 +550,7 @@ fn (mut ch Channel) try_pop_priv(dest voidptr, no_block bool) ChanState {
|
|||||||
// -2 if all channels are closed
|
// -2 if all channels are closed
|
||||||
|
|
||||||
pub fn channel_select(mut channels []&Channel, dir []Direction, mut objrefs []voidptr, timeout time.Duration) int {
|
pub fn channel_select(mut channels []&Channel, dir []Direction, mut objrefs []voidptr, timeout time.Duration) int {
|
||||||
$if debug {
|
$if debug_channels ? {
|
||||||
assert channels.len == dir.len
|
assert channels.len == dir.len
|
||||||
assert dir.len == objrefs.len
|
assert dir.len == objrefs.len
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user