Overview | The work_pending() method is used in a server application to determine if any outstanding requests need to be processed. |
Original class | CORBA::ORB |
Exceptions | CORBA::SystemException |
Intended Usage
The work_pending() method is intended to be used by server applications in situations where you cannot use an infinite request-processing loop. The method will return an indication as to whether any outstanding requests need to be processed by the server. This method would be useful in a single-threaded server where you need to use a polling-type approach for processing requests.
Syntax
CORBA::Boolean work_pending();
Return values
Example
#include <corba.h> // Assume "op" points to the ORB object. ... int done = 0; // Enter the polling loop. while ( !done ) { // Check to see if any requests are pending. if ( op->work_pending() ) op->perform_work(); // Do other stuff in the polling loop. ... }