diff options
| author | Alan Conway <aconway@apache.org> | 2006-11-08 17:07:44 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2006-11-08 17:07:44 +0000 |
| commit | f34ace35220726fa64f063a0fccc6eeaaa40af3c (patch) | |
| tree | 77f817feb9560fac0abe22b55327c1057e94bcb9 /qpid/cpp/test/client/client_test.cpp | |
| parent | 21d986eff6cd096c0e4a3db4c603ad72f64270fa (diff) | |
| download | qpid-python-f34ace35220726fa64f063a0fccc6eeaaa40af3c.tar.gz | |
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
Diffstat (limited to 'qpid/cpp/test/client/client_test.cpp')
| -rw-r--r-- | qpid/cpp/test/client/client_test.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
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(); |
