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:
Delyan Angelov 2023-10-26 05:33:51 +03:00
parent d515eb0dfa
commit 14618a1b18
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -550,7 +550,7 @@ fn (mut ch Channel) try_pop_priv(dest voidptr, no_block bool) ChanState {
// -2 if all channels are closed
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 dir.len == objrefs.len
}