091_async8.zig 347 B

1234567891011121314151617181920
  1. //
  2. // Perhaps you have been wondering why we have always called 'suspend'
  3. // with an expression in the form of an empty block:
  4. //
  5. // suspend {}
  6. //
  7. // well,
  8. //
  9. const print = @import("std").debug.print;
  10. pub fn main() void {
  11. var my_beef = getBeef(0);
  12. print("beef? {X}!\n", .{my_beef});
  13. }
  14. fn getBeef(input: u32) u32 {
  15. suspend {}
  16. }