calling close causes AssertionError
This commit is contained in:
parent
12ef92dfe9
commit
32ecd8074c
|
@ -33,10 +33,8 @@ proc asyncExecCmd*(command: string): Future[string] =
|
||||||
(result, exitCode) = execCmdEx(command)
|
(result, exitCode) = execCmdEx(command)
|
||||||
if exitCode != 0:
|
if exitCode != 0:
|
||||||
failureEvent.trigger()
|
failureEvent.trigger()
|
||||||
successEvent.close() # FIXME: is close the right way to cancel an event?
|
|
||||||
else:
|
else:
|
||||||
successEvent.trigger()
|
successEvent.trigger()
|
||||||
failureEvent.close() # FIXME: is close the right way to cancel an event?
|
|
||||||
let flowVar = spawn execCmdBackground(successEvent, failureEvent, command)
|
let flowVar = spawn execCmdBackground(successEvent, failureEvent, command)
|
||||||
proc successCallback(fd: AsyncFD): bool =
|
proc successCallback(fd: AsyncFD): bool =
|
||||||
future.complete(^flowVar)
|
future.complete(^flowVar)
|
||||||
|
|
Loading…
Reference in New Issue