![]() |
![]() |
e-docs > Tuxedo > Administering a Tuxedo Application at Run Time > CORBA API |
Administering a Tuxedo Application at Run Time
|
Synopsis
Allows the ORB to perform server-related work.
C++ Binding
void CORBA::ORB::perform_work ();
Arguments
None.
Exceptions
Once the ORB has shut down, a call to work_pending and perform_work() raises the BAD_INV_ORDER exception. An application can detect this exception to determine when to terminate a polling loop.
Description
If called by the main thread, this operation allows the ORB to perform server-related work. Otherwise, it does nothing.
The work_pending() and perform_work() operations can be used to write a simple polling loop that multiplexes the main thread among the ORB and other activities. Such a loop would most likely be needed in a single-threaded server. A multithreaded server would need a polling loop only if there were both ORB and other code that required use of the main thread. See the example below for such a polling loop.
Return Values
None.
See Also
CORBA::ORB::work_pending
Example
The following is an example of a polling loop:
// C++
for (;;) {
if (orb->work_pending()) {
orb->perform_work();
}
// do other things
// sleep?
}
![]() |
![]() |
![]() |
![]() |
||
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |