Ticket #905 (closed defect: fixed)
Apparent race condition in gui:background-process-run-function
|Reported by:||rongarret||Owned by:||gb|
(dotimes (i 3) (gui:background-process-run-function "foo" (lambda () (print 123))))
results in one successfully spawned process and one that reports:
Error: "Untitled 2" already exists
(with one of the most horrifically long backtraces I have ever seen from a process that did not actually overflow the stack).
(dotimes (i 2) (gui:background-process-run-function "foo" (lambda () (print 123))) (sleep 0.01))
results in two successfully spawned processes. These results are repeatable for N>2. My guess is this is a race condition having to do with the naming of the windows that are created by the underlying deferred-cocoa-listener-output-streams but I have not been able to verify this.