TibrvIOEvent
Class
Declaration
classTibrvIOEvent: public TibrvEvent
TibrvI0Event(); // Create empty.
virtual ~TibrvI0Event(); // Destroy and reclaim storage.
Purpose
I/O event.
Remarks
The constructor creates a hollow object; TibrvIOEvent::create() makes it operational.
The destructor calls the destroy method, unless the C object is already destroyed.
Destroying the queue of an I/O event automatically destroys the I/O event as well.
Activation and Dispatch
The method TibrvIOEvent::create() creates an event object that describes an I/O situation, and activates the event—that is, it requests notification from the operating system when that I/O situation occurs. When the situation occurs, Rendezvous software deactivates the event, and places the event object on its event queue. Dispatch removes the event object from the queue, and runs the callback method to process the event. When the callback method returns, Rendezvous software automatically reactivates the event. (To stop the cycle, destroy the event object; see TibrvEvent::destroy().)
I/O Event Activation and Dispatch illustrates that Rendezvous software temporarily deactivates the I/O event from the time it enters the queue until its callback method returns. Consequently, an I/O object can cause at most one event at a time.
Figure 228: I/O Event Activation and Dispatch
Semantics of I/O Events
The semantics of all I/O conditions depend on the underlying operating system and event manager. Rendezvous software does not change those semantics.
I/O events trigger when the operating system reports that an I/O condition on a monitored socket would succeed (that is, transfer at least one byte without blocking). Nonetheless, Rendezvous software cannot guarantee that a subsequent I/O call will not block.
|
Method |
Description |
|
Inherited Methods |