Spectrum is now read-only. Learn more about the decision in our official announcement.


Eclipse Theia - Cloud & Desktop IDE


onStop sync/async mix

January 24, 2019 at 2:52pm

onStop sync/async mix

January 24, 2019 at 2:52pm (Edited 4 years ago)
The frontend/backend-contribution indicates that onStop is synchronous. However, WorkspaceServer's onStop calls an asynchronous method to set the last used workspace.
Is there any garantee that the last workspace used will actually get written out to the filesystem, or is this a "fingers-crossed it finishes in time" situation?
I am curious if there is a way to finish asynchronous or long-running operations called within onStop. I want to store some data (which is an asynchronous operation) which can happen after the window closes, but before Theia exits. Is it possible to do this in Theia, Electron specifically?

January 24, 2019 at 3:52pm
It doesn't run async afterwards.

January 25, 2019 at 8:00am