mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-12 08:50:04 -04:00
allow processes to handle hard interrupts
no general purpose api at this time closes #2904
This commit is contained in:
parent
bf0fea1354
commit
7b77dba230
@ -65,7 +65,8 @@ process.list[init_thread] = {
|
||||
vars={},
|
||||
handles={},
|
||||
io={}, --init will populate this
|
||||
coroutine_handler = _coroutine
|
||||
coroutine_handler = _coroutine,
|
||||
signal = error
|
||||
},
|
||||
instances = setmetatable({}, {__mode="v"})
|
||||
}
|
||||
|
@ -36,7 +36,8 @@ computer.pullSignal = function(...) -- dispatch
|
||||
if interrupting then
|
||||
lastInterrupt = current_time
|
||||
if keyboard.isAltDown() then
|
||||
error("interrupted", 0)
|
||||
require("process").info().data.signal("interrupted", 0)
|
||||
return
|
||||
end
|
||||
event.push("interrupted", current_time)
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user