Store reference to thread in ShellCommand

This commit is contained in:
blinry 2020-11-02 15:19:52 +01:00
parent e220211140
commit 664fefe2e5
2 changed files with 6 additions and 4 deletions

View file

@ -31,8 +31,9 @@ func run_async(command, crash_on_fail=true):
shell_command.command = command shell_command.command = command
shell_command.crash_on_fail = crash_on_fail shell_command.crash_on_fail = crash_on_fail
var _thread = Thread.new() var t = Thread.new()
_thread.start(self, "run_async_thread", shell_command) shell_command.thread = t
t.start(self, "run_async_thread", shell_command)
return shell_command return shell_command

View file

@ -7,3 +7,4 @@ var command
var output var output
var exit_code var exit_code
var crash_on_fail = true var crash_on_fail = true
var thread