diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-11-12 17:59:24 -0500 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-11-12 18:55:17 -0500 |
| commit | 37318bf15138d0a7b158b32ca43cbcdcf5382942 (patch) | |
| tree | 6eaa8e27a874daaaa452107c069c2ac137eff758 /lib/std/event | |
| parent | 956ba8b0e7ada08f2f85cd41ee73af6453db0c16 (diff) | |
| download | zig-37318bf15138d0a7b158b32ca43cbcdcf5382942.tar.gz zig-37318bf15138d0a7b158b32ca43cbcdcf5382942.zip | |
fn parameters participate in result location semantics
See #3665
Diffstat (limited to 'lib/std/event')
| -rw-r--r-- | lib/std/event/loop.zig | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/lib/std/event/loop.zig b/lib/std/event/loop.zig index 543863c71e..588cd3c8b5 100644 --- a/lib/std/event/loop.zig +++ b/lib/std/event/loop.zig @@ -645,12 +645,6 @@ pub const Loop = struct { } } - /// This is equivalent to function call, except it calls `startCpuBoundOperation` first. - pub fn call(comptime func: var, args: ...) @typeOf(func).ReturnType { - startCpuBoundOperation(); - return func(args); - } - /// Yielding lets the event loop run, starting any unstarted async operations. /// Note that async operations automatically start when a function yields for any other reason, /// for example, when async I/O is performed. This function is intended to be used only when @@ -942,23 +936,6 @@ test "std.event.Loop - basic" { loop.run(); } -test "std.event.Loop - call" { - // https://github.com/ziglang/zig/issues/1908 - if (builtin.single_threaded) return error.SkipZigTest; - - var loop: Loop = undefined; - try loop.initMultiThreaded(); - defer loop.deinit(); - - var did_it = false; - var handle = async Loop.call(testEventLoop); - var handle2 = async Loop.call(testEventLoop2, &handle, &did_it); - - loop.run(); - - testing.expect(did_it); -} - async fn testEventLoop() i32 { return 1234; } |
