diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1996-10-27 23:14:37 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1996-10-27 23:14:37 +0000 |
commit | 742c04c6fe01984a9699acfc664b0c88d9f5d5dc (patch) | |
tree | f94e403b95ed7578914bb1fd612e103e408b497a /examples/ASX/Message_Queue/bounded_buffer.cpp | |
parent | 0cc5504a5c8a958101a09accb21c135281d5e9ff (diff) | |
download | ATCD-742c04c6fe01984a9699acfc664b0c88d9f5d5dc.tar.gz |
Yow!
Diffstat (limited to 'examples/ASX/Message_Queue/bounded_buffer.cpp')
-rw-r--r-- | examples/ASX/Message_Queue/bounded_buffer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/ASX/Message_Queue/bounded_buffer.cpp b/examples/ASX/Message_Queue/bounded_buffer.cpp index fc0a42cde31..faaf7e0cd00 100644 --- a/examples/ASX/Message_Queue/bounded_buffer.cpp +++ b/examples/ASX/Message_Queue/bounded_buffer.cpp @@ -13,9 +13,6 @@ // Global thread manager. static ACE_Thread_Manager thr_mgr; -// Message list. -static ACE_Message_Queue<ACE_MT_SYNCH> msg_queue; - // The producer reads data from the stdin stream, creates a message, // and then queues the message in the message list, where it is // removed by the consumer thread. A 0-sized message is enqueued when @@ -105,10 +102,13 @@ static void *consumer (ACE_Message_Queue<ACE_MT_SYNCH> *msg_queue) return 0; } -/* Spawn off two threads that copy stdin to stdout. */ +// Spawn off two threads that copy stdin to stdout. int main (int, char *[]) { + // Message list. + ACE_Message_Queue<ACE_MT_SYNCH> msg_queue; + if (thr_mgr.spawn (ACE_THR_FUNC (producer), (void *) &msg_queue, THR_NEW_LWP | THR_DETACHED) == -1) ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "spawn"), 1); |