diff options
author | 2022-03-01 00:47:31 -0800 | |
---|---|---|
committer | 2022-03-01 00:47:31 -0800 | |
commit | 114c0e8ed2a0eea835139ece3677efce09a8b702 (patch) | |
tree | bb1c4f6d3e3514585728b29ddf3d4d052e223b15 /src/io/io_linux.zig | |
parent | 9ccb520e9e93cf85227eb37febec6acdf45bd9cf (diff) | |
download | bun-114c0e8ed2a0eea835139ece3677efce09a8b702.tar.gz bun-114c0e8ed2a0eea835139ece3677efce09a8b702.tar.zst bun-114c0e8ed2a0eea835139ece3677efce09a8b702.zip |
[bun.js] Implement `setTimeout`, `setInterval`, `clearTimeout`, `clearInterval`
Diffstat (limited to 'src/io/io_linux.zig')
-rw-r--r-- | src/io/io_linux.zig | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/io/io_linux.zig b/src/io/io_linux.zig index 2ba2b3e36..4e4d9137f 100644 --- a/src/io/io_linux.zig +++ b/src/io/io_linux.zig @@ -453,6 +453,10 @@ completed: FIFO(Completion) = .{}, next_tick: FIFO(Completion) = .{}, +pub fn hasNoWork(this: *IO) bool { + return this.completed.peek() == null and this.unqueued.peek() == null and this.next_tick.peek() == null; +} + pub fn init(entries_: u12, flags: u32) !IO { var ring: IO_Uring = undefined; var entries = entries_; |