ACE_Task<> Class Template ReferencePrimary interface for application message processing, as well as input and output message queueing. More...
Inheritance diagram for ACE_Task<>:
![]()
Collaboration diagram for ACE_Task<>:
![]()
Detailed Descriptiontemplate<ACE_SYNCH_DECL>
Primary interface for application message processing, as well as input and output message queueing.
|
ACE_Task<>::ACE_Task | ( | ACE_Thread_Manager * | thr_mgr = 0 , |
|
ACE_Message_Queue< ACE_SYNCH_USE > * | mq = 0 | |||
) |
Initialize a Task, supplying a thread manager and a message queue. If the user doesn't supply a ACE_Message_Queue pointer then we'll allocate one dynamically. Otherwise, we'll use the one passed as a parameter.
ACE_Message_Queue<ACE_SYNCH_USE>* ACE_Task<>::msg_queue | ( | void | ) |
Gets the message queue associated with this task.
void ACE_Task<>::msg_queue | ( | ACE_Message_Queue< ACE_SYNCH_USE > * | ) |
Sets the message queue associated with this task.
int ACE_Task<>::putq | ( | ACE_Message_Block * | , | |
ACE_Time_Value * | timeout = 0 | |||
) |
Insert message into the message queue. Note that timeout uses <{absolute}> time rather than <{relative}> time.
int ACE_Task<>::getq | ( | ACE_Message_Block *& | mb, | |
ACE_Time_Value * | timeout = 0 | |||
) |
Extract the first message from the queue (blocking). Note that timeout uses <{absolute}> time rather than <{relative}> time. Returns number of items in queue if the call succeeds or -1 otherwise.
int ACE_Task<>::ungetq | ( | ACE_Message_Block * | , | |
ACE_Time_Value * | timeout = 0 | |||
) |
Return a message to the queue. Note that timeout uses <{absolute}> time rather than <{relative}> time.
int ACE_Task<>::reply | ( | ACE_Message_Block * | , | |
ACE_Time_Value * | timeout = 0 | |||
) |
Turn the message around, sending it in the opposite direction in the stream. To do this, the message is put onto the task next in the stream after this task's sibling.
ACE_Message_Block | Pointer to the block that is used in the reply. | |
timeout | The absolute time at which the put operation used to send the message block to the next module in the stream will time out. If 0, this call blocks until it can be completed. |
int ACE_Task<>::put_next | ( | ACE_Message_Block * | msg, | |
ACE_Time_Value * | timeout = 0 | |||
) |
Transfer message to the adjacent ACE_Task in a ACE_Stream. Note that timeout uses <{absolute}> time rather than <{relative}> time.
int ACE_Task<>::can_put | ( | ACE_Message_Block * | ) |
Tests whether we can enqueue a message without blocking.
Return the name of the enclosing Module if there's one associated with the Task, else returns 0.
Set next Task pointer.
Return the Task's sibling if there's one associated with the Task's Module, else returns 0.
ACE_Module<ACE_SYNCH_USE>* ACE_Task<>::module | ( | void | ) | const |
Return the Task's Module if there is one, else returns 0.
int ACE_Task<>::flush | ( | u_long | flag = ACE_Task_Flags::ACE_FLUSHALL |
) |
Flush the task's queue, i.e., free all of the enqueued message blocks and unblocks any threads waiting on the queue. Note that if this conflicts with the C++ iostream <flush> function, just rewrite the iostream function as ::<flush>.
void ACE_Task<>::water_marks | ( | ACE_IO_Cntl_Msg::ACE_IO_Cntl_Cmds | , | |
size_t | ||||
) |
Manipulate watermarks.
void ACE_Task<>::dump | ( | void | ) | const |
Dump the state of an object.
Reimplemented in ACE_Stream_Head<>, ACE_Stream_Tail<>, ACE_Thru_Task<>, ACE_Svc_Handler<, >, ACE_Buffered_Svc_Handler<, >, and ACE_Svc_Handler< ACE_PEER_STREAM_2, ACE_SYNCH_USE >.
friend class ACE_Module< ACE_SYNCH_USE > [friend] |
friend class ACE_Module_Type [friend] |
ACE_Message_Queue<ACE_SYNCH_USE>* ACE_Task<>::msg_queue_ |
Queue of messages on the ACE_Task..
bool ACE_Task<>::delete_msg_queue_ |
true if should delete Message_Queue, false otherwise.
ACE_Module<ACE_SYNCH_USE>* ACE_Task<>::mod_ |
Back-pointer to the enclosing module.
ACE_Task<>::ACE_ALLOC_HOOK_DECLARE |
Declare the dynamic allocation hooks.
Reimplemented in ACE_Stream_Head<>, ACE_Stream_Tail<>, and ACE_Thru_Task<>.