Bionic Buffalo Tech Note #49: Thread Support in the
Object Request Broker
procedures are not async signal safe
If an application requires fewer restrictions (for instance, if it must be cancel safe), then a different
ORB (such as
) should be used.
ORB is available at http://www.tatanka.com/prod/info/gibraltar.html.
Threads and the
Each thread is associated with a unique copy of the
. State information used
by the ORB for a thread is associated with that thread's
t. A thread acquires a
pointer to its
The first time a thread calls
, a new environment will be created for that
thread. Subsequent calls to
will return the same environment, without
creating a new environment.
A thread can destroy its environment by calling
. This can be
done at any time except from within a servant method. Once the thread's environment is destroyed, the
ORB is oblivious to the thread, and it may be cancelled or suicide if necessary. A thread whose
environment is destroyed also may call
, and a new environment will be
created for that thread.
Operation Invocation and Connection Management
In operation invocations by local (same process) clients, threads are handled as follows:
For local servants, the method is called in the same thread used to call the operation.
For remote (different process or different network node) servants, the calling thread
blocks within the ORB until the operation is completed or fails. (Each pending remote
operation involves a separate remote connection; simultaneous connections to the same
server are not multiplexed.)
When initialized, the
ORB creates a thread whose sole purpose is to accept incoming
connections. The total number of simultaneous connections is limited by a configurable value, which
determines the maximum number of remote clients which can be connected at the same time. A thread
is also established for each potential simultaneous connection. (These are the connection threads.)
Each connection might result in zero or more active requests. Another configurable value determines
the maximum number of simultaneous requests, and a task is created for each. (These are the remote
request threads.) Finally, a task is created whose purpose is to manage request and operation timeouts.
Thus, in addition to the threads created by the application itself, the ORB creates
Page 2 of 4