-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check handle to close in current loop when
loop_gc
- Loading branch information
Showing
5 changed files
with
80 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--come from https://github.com/luvit/luv/issues/599 | ||
|
||
-- run `lua manual-test-exit.lua || echo $?` | ||
-- it shoud print `5` | ||
|
||
local uv = require('luv') | ||
|
||
local function setTimeout(callback, ms) | ||
local timer = uv.new_timer() | ||
timer:start(ms, 0, function() | ||
timer:stop() | ||
timer:close() | ||
callback() | ||
end) | ||
return timer | ||
end | ||
|
||
setTimeout(function() | ||
os.exit(5, true) | ||
end, 1000) | ||
|
||
uv.run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
local uv = require('luv') | ||
|
||
local test = uv.new_pipe(false) | ||
uv.close(test) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters