Searched +hist:5 +hist:dccfc19 (Results 1 - 1 of 1) sorted by relevance

/haiku/src/kits/app/
H A DApplication.cppdiff 6bfd06d1 Thu Aug 31 11:54:16 MDT 2006 Ingo Weinhold <ingo_weinhold@gmx.de> BRoster::Launch() eventually launches the application in question
in several steps:
1. early pre-registration with the registrar ("I wanna launch the
app, make sure noone interferes.")
2. load the app image
3. finish pre-registration with the registrar ("I have launched
the app, here is its team ID.")
4. start app main thread
5. send "on launch" messages to the app (argv, refs, others)

If the app is already running or being launched, 1. fails with a
conclusive error code and returns the team ID and the pre-registration
token of the app. Steps 2 - 4 are skipped and only the messages are
delivered using the team ID returned by 1.

This change fixes a race condition: The failed early pre-registration
request obviously cannot return the team ID, if the other thread
launching the app has not finished step 3 yet. Thus the argv/refs
message would not get delivered and Launch() would not return the
correct team ID.

Now we wait for the pre-registration to be finished in this case, using
the former _IsAppPreRegistered() mechanism, which already provided
such a waiting feature for one request. It has been extended to
accomodate an arbitrary number of waiting requests and renamed to
_IsAppRegistered().

This fixed bug #763.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18728 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 5f8e562f Thu Jun 16 12:53:24 MDT 2005 Axel Dörfler <axeld@pinc-software.de> Added a ToDo comment.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13185 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 5dccfc19 Thu Jul 29 00:49:17 MDT 2004 Stefano Ceccherini <stefano.ceccherini@gmail.com> Some small changes (mostly suggested by Axel). Added more ToDO items, changed some comments, added some more (unhandled yet) message codes.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8496 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 5dccfc19 Thu Jul 29 00:49:17 MDT 2004 Stefano Ceccherini <stefano.ceccherini@gmail.com> Some small changes (mostly suggested by Axel). Added more ToDO items, changed some comments, added some more (unhandled yet) message codes.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8496 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 6bfd06d1ff129f4db4445b978fa3ee9257f239c9 Thu Aug 31 11:54:16 MDT 2006 Ingo Weinhold <ingo_weinhold@gmx.de> BRoster::Launch() eventually launches the application in question
in several steps:
1. early pre-registration with the registrar ("I wanna launch the
app, make sure noone interferes.")
2. load the app image
3. finish pre-registration with the registrar ("I have launched
the app, here is its team ID.")
4. start app main thread
5. send "on launch" messages to the app (argv, refs, others)

If the app is already running or being launched, 1. fails with a
conclusive error code and returns the team ID and the pre-registration
token of the app. Steps 2 - 4 are skipped and only the messages are
delivered using the team ID returned by 1.

This change fixes a race condition: The failed early pre-registration
request obviously cannot return the team ID, if the other thread
launching the app has not finished step 3 yet. Thus the argv/refs
message would not get delivered and Launch() would not return the
correct team ID.

Now we wait for the pre-registration to be finished in this case, using
the former _IsAppPreRegistered() mechanism, which already provided
such a waiting feature for one request. It has been extended to
accomodate an arbitrary number of waiting requests and renamed to
_IsAppRegistered().

This fixed bug #763.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18728 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 5f8e562f04e48e6794a4400f7f24e24be9fc07c6 Thu Jun 16 12:53:24 MDT 2005 Axel Dörfler <axeld@pinc-software.de> Added a ToDo comment.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13185 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 5dccfc1921b8c31b1d576a2c1002cfdccab90b67 Thu Jul 29 00:49:17 MDT 2004 Stefano Ceccherini <stefano.ceccherini@gmail.com> Some small changes (mostly suggested by Axel). Added more ToDO items, changed some comments, added some more (unhandled yet) message codes.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8496 a95241bf-73f2-0310-859d-f6bbb57e9c96

Completed in 115 milliseconds