mirror of
https://github.com/ziglang/zig.git
synced 2024-11-15 08:33:06 +00:00
std.event.Loop.runDetached should be pub
This commit is contained in:
parent
beda6f2299
commit
bf0afaa876
@ -649,7 +649,7 @@ pub const Loop = struct {
|
||||
|
||||
/// Runs the provided function asynchonously, similarly to Go's "go" operator.
|
||||
/// `func` must return void and it can be an async function.
|
||||
fn runDetached(self: *Loop, alloc: *mem.Allocator, comptime func: anytype, args: anytype) error{OutOfMemory}!void {
|
||||
pub fn runDetached(self: *Loop, alloc: *mem.Allocator, comptime func: anytype, args: anytype) error{OutOfMemory}!void {
|
||||
if (!std.io.is_async) @compileError("Can't use runDetached in non-async mode!");
|
||||
if (@TypeOf(@call(.{}, func, args)) != void) {
|
||||
@compileError("`func` must not have a return value");
|
||||
|
Loading…
Reference in New Issue
Block a user