id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
905	Apparent race condition in gui:background-process-run-function	rongarret	gb	"This:

(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).

But this:

(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.
"	defect	closed	major		IDE	trunk	fixed		
