From f34ace35220726fa64f063a0fccc6eeaaa40af3c Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Wed, 8 Nov 2006 17:07:44 +0000 Subject: More reorg to separate APR/posix code, work in progress. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@472545 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/test/client/client_test.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'qpid/cpp/test/client/client_test.cpp') diff --git a/qpid/cpp/test/client/client_test.cpp b/qpid/cpp/test/client/client_test.cpp index 0e57babbef..8e9c58179a 100644 --- a/qpid/cpp/test/client/client_test.cpp +++ b/qpid/cpp/test/client/client_test.cpp @@ -36,9 +36,7 @@ public: inline virtual void received(Message& /*msg*/){ std::cout << "Received message " /**<< msg **/<< std::endl; - monitor->acquire(); monitor->notify(); - monitor->release(); } }; @@ -77,12 +75,12 @@ int main(int argc, char**) msg.setData(data); channel.publish(msg, exchange, "MyTopic"); std::cout << "Published message." << std::endl; - - monitor.acquire(); - monitor.wait(); - monitor.release(); - + { + Monitor::ScopedLock l(monitor); + monitor.wait(); + } + con.closeChannel(&channel); std::cout << "Closed channel." << std::endl; con.close(); -- cgit v1.2.1