[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Sc-devel] Problem with UI.shutdown order



i would like to propose the following modification of UI:*registerForShutdown:

current:
	*registerForShutdown {
		arg function;
		shutdownActions = shutdownActions.add(function);
	}

new:
	*registerForShutdown { arg function, addAction = \addToTail;
		switch( addAction,
		\addToTail, { shutdownActions = shutdownActions.add( function )},
		\addToHead, { shutdownActions = function.asArray ++ shutdownActions },
		{ Error( "Illegal addAction " ++ addAction.asCompileString ).throw });
	}

because that would allow me (you) to register something that is executed before other regular shutdown procedures, e.g. JSCWindow.closeAll before NetAddr.disconnectAll.

since it doesn't break anything, there shouldn't be problem to commit that?

ciao, -sciss-


Am 06.02.2008 um 09:39 schrieb Sciss:

hi,

i have a severe problem with the latest RC: there is a race condition
in UI -> shutdown : what never happened before in three years is that
NetAddr's

		UI.registerForShutdown({
			this.disconnectAll;
		});

is executed before JSCWindow's

		UI.registerForShutdown({ this.closeAll });

.... that means that the windows cannot be closed any more (the TCP
connection is cut before JSCWindow.closeAll is called) ...

that is obviously very bad and i don't know how to solve that
problem. has the class initialization order been changed in some way?
can NetAddr's disconnectAll be executed after the shutdown
registrations?

ciao, -sciss-
_______________________________________________
Sc-devel mailing list
Sc-devel@xxxxxxxxxxxxxxx
http://lists.create.ucsb.edu/mailman/listinfo/sc-devel