haiku/docs/develop
Ingo Weinhold 6bfd06d1ff 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
2006-08-31 17:54:16 +00:00
..
app Add a documentation of the Dano message format. These are my findings from looking at flattened Dano messages. I will adjust the Dano message reader accordingly. 2005-11-07 00:17:34 +00:00
befs It is accomplished ... 2002-07-09 12:24:59 +00:00
drivesetup It is accomplished ... 2002-07-09 12:24:59 +00:00
fontprefs It is accomplished ... 2002-07-09 12:24:59 +00:00
ikteam Fixed a mistake in the declaration for class BFoo in the "pointer to new 2003-01-25 20:59:47 +00:00
input It is accomplished ... 2002-07-09 12:24:59 +00:00
interface BRegion tests results, for reference 2004-03-31 10:58:22 +00:00
kernel Moved all documentation out of the device_manager.h header file to this place. 2005-05-11 16:40:13 +00:00
keymap It is accomplished ... 2002-07-09 12:24:59 +00:00
media Fixed, hope this one will be ok 2003-12-16 15:38:55 +00:00
midi Updated to-do list. 2004-05-14 15:00:06 +00:00
net Reworked the parts that are affected by the reintroduction of the datalink module. 2006-07-21 09:48:33 +00:00
print Info about Spool File Format. 2002-07-28 18:40:55 +00:00
servers BRoster::Launch() eventually launches the application in question 2006-08-31 17:54:16 +00:00
storage Squashed several TODO items by changing the Storage Kit <-> Kernel interface. 2004-08-28 20:04:41 +00:00
support Added a doxygen_config file for the Support kit. I hope the storage kit will excuse me for stoling their file :) 2003-01-10 16:14:55 +00:00
virtualmemory It is accomplished ... 2002-07-09 12:24:59 +00:00