News for hackers. Stuff that matters.
Re:Zig: Upcoming Release Postponed Two More Weeks and Lacks ... by xxpor on Wednesday July 19, 2023 @12:03PM (#36788608)
Usually the coloring problem IME goes the other way: you want to run a synchronous/blocking function in an async context. How does Zig deal with that?
Re:Zig: Upcoming Release Postponed Two More Weeks and Lacks ... by lvass on Wednesday July 19, 2023 @12:11PM (#36788756)
Function calls?
Re:Zig: Upcoming Release Postponed Two More Weeks and Lacks ... by Nullabillity on Wednesday July 19, 2023 @07:18PM (#36794881)
And now you're blocking the event loop.
Re:Zig: Upcoming Release Postponed Two More Weeks and Lacks ... by lvass on Wednesday July 19, 2023 @07:49PM (#36795150)
If you chose to use cooperative concurrency, it's because you can make it cooperate. Use preemption otherwise.
Re:Zig: Upcoming Release Postponed Two More Weeks and Lacks ... by j16sdiz on Wednesday July 19, 2023 @01:38PM (#36790230)
They have await keyword. This is noop in sync mode
Re:Zig: Upcoming Release Postponed Two More Weeks and Lacks ... by kprotty on Thursday July 20, 2023 @09:30AM (#36800152)
Did you mean the `nosuspend` keyword? It only asserts nothing suspends rather than there being a "sync" mode.