added ub exploration to ex090
This commit is contained in:
parent
8dd9c1ddcb
commit
da219d3c40
2 changed files with 65 additions and 1 deletions
20
091_async8.zig
Normal file
20
091_async8.zig
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
//
|
||||
// Perhaps you have been wondering why we have always called 'suspend'
|
||||
// with an expression in the form of an empty block:
|
||||
//
|
||||
// suspend {}
|
||||
//
|
||||
// well,
|
||||
//
|
||||
const print = @import("std").debug.print;
|
||||
|
||||
pub fn main() void {
|
||||
|
||||
var my_beef = getBeef(0);
|
||||
|
||||
print("beef? {X}!\n", .{my_beef});
|
||||
}
|
||||
|
||||
fn getBeef(input: u32) u32 {
|
||||
suspend {}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue