enthought/envisage — pull request #8 by pankajp (2012-02-16 11:07:02+00:00)
Title: BUG: TaskApplication stop() on last window close was buggy.

Stop cannot be invoked later in gui thread because the gui loop
exits as soon as last window is closed, unless `quitOnLastWindowClosed`
is set to False, which would require other changes.
Invoke later does not seem necessary here because `closed` event is
traits event and all handlers are executed before proceeding.
Fixes bug in task application exit if invoke_later is actually
fixed to invoke via gui event loop
(pyface commit https://github.com/enthought/pyface/commit/385a67e5350722586531e7860002e301e6e368f2 ,
which was reverted because of this bug).