diff options
author | 2023-09-12 21:36:27 -0700 | |
---|---|---|
committer | 2023-09-12 21:36:27 -0700 | |
commit | d4a2c29131ec154f5e4db897d4deedab2002cbc4 (patch) | |
tree | a26646e5b99e0185a721f7aff689a86ca9f13f0e | |
parent | a5b9c9c1c3da9fb019ad810e44c88dae128f9866 (diff) | |
download | bun-dave/postinstall_2.tar.gz bun-dave/postinstall_2.tar.zst bun-dave/postinstall_2.zip |
-rw-r--r-- | src/bun.js/event_loop.zig | 17 | ||||
-rw-r--r-- | src/cli/run_command.zig | 58 |
2 files changed, 0 insertions, 75 deletions
diff --git a/src/bun.js/event_loop.zig b/src/bun.js/event_loop.zig index 81496ab0a..f22d8793a 100644 --- a/src/bun.js/event_loop.zig +++ b/src/bun.js/event_loop.zig @@ -1005,12 +1005,6 @@ pub const MiniEventLoop = struct { } } - pub fn drainTasks(this: *MiniEventLoop, context: *anyopaque) void { - while (this.tasks.readItem()) |task| { - task.run(context); - } - } - pub fn enqueueTask( this: *MiniEventLoop, comptime Context: type, @@ -1099,15 +1093,4 @@ pub const AnyEventLoop = union(enum) { }, } } - - pub fn drainTasks(this: *AnyEventLoop, context: *anyopaque) void { - switch (this.*) { - .jsc => { - unreachable; - }, - .mini => { - this.mini.drainTasks(context); - }, - } - } }; diff --git a/src/cli/run_command.zig b/src/cli/run_command.zig index 526f4b873..f5240246c 100644 --- a/src/cli/run_command.zig +++ b/src/cli/run_command.zig @@ -561,64 +561,6 @@ pub const RunCommand = struct { }; } - // pub fn waitForPackageScript(script: *SpawnedScript, name: string, is_sync: bool, alloc: std.mem.Allocator) bool { - // log("Waiting for script {s}, {d}", .{ name, script.pid }); - // // script.readNonBlocking(alloc) catch |err| { - // // Output.prettyErrorln("<r><red>error<r>: Failed to read output of script <b>{s}<r> due to error <b>{s}<r>", .{ name, @errorName(err) }); - // // Output.flush(); - // // // ?! kill process? - // // return true; - // // }; - // while (true) { - // switch (PosixSpawn.waitpid(script.pid, if (is_sync) 0 else std.os.W.NOHANG)) { - // .err => |err| { - // // script.readAllOutput(); - - // Output.prettyErrorln("<r><red>error<r>: Failed to run script <b>{s}<r> due to error <b>{d} {s}<r>", .{ name, err.errno, @tagName(err.getErrno()) }); - // Output.flush(); - // // ?! kill process? - // return true; - // }, - // .result => |result| { - // if (result.pid == 0) return false; - // if (std.os.W.IFEXITED(result.status)) { - // defer script.deinit(alloc); - - // // script.readAllOutput(); - - // const code = std.os.W.EXITSTATUS(result.status); - // if (code > 0) { - // if (code != 2) { - // Output.prettyErrorln("<r><red>error<r><d>:<r> script <b>\"{s}\"<r> exited with {any}<r>", .{ name, bun.SignalCode.from(code) }); - // Output.flush(); - // } - // Global.exit(code); - // } - // return true; - // } - // if (std.os.W.IFSIGNALED(result.status)) { - // const signal = std.os.W.TERMSIG(result.status); - - // // script.readAllOutput(); - - // Output.prettyErrorln("<r><red>error<r><d>:<r> script <b>\"{s}\"<r> exited with {any}<r>", .{ name, bun.SignalCode.from(signal) }); - // Output.flush(); - // Global.exit(1); - // } - // if (std.os.W.IFSTOPPED(result.status)) { - // const signal = std.os.W.STOPSIG(result.status); - - // // script.readAllOutput(); - - // Output.prettyErrorln("<r><red>error<r><d>:<r> script <b>\"{s}\"<r> was stopped by signal {any}<r>", .{ name, bun.SignalCode.from(signal) }); - // Output.flush(); - // Global.exit(1); - // } - // }, - // } - // } - // } - pub fn runPackageScriptForeground( allocator: std.mem.Allocator, original_script: string, |