std.event.Loop.runDetached should be pub

This commit is contained in:
Alexandros Naskos 2020-10-01 16:50:05 +03:00 committed by GitHub
parent beda6f2299
commit bf0afaa876
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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");