diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2005-07-06 13:08:23 +0000 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2005-07-06 13:08:23 +0000 |
commit | 3030ac8c355435c4426c82019669c476f5c76088 (patch) | |
tree | c57f7c0a983c44847f93285f0676df49f21707b9 /cppe/demo/IceE/workqueue/WorkQueue.cpp | |
parent | Use direct proxy for process object instead of indirect proxy (diff) | |
download | ice-3030ac8c355435c4426c82019669c476f5c76088.tar.bz2 ice-3030ac8c355435c4426c82019669c476f5c76088.tar.xz ice-3030ac8c355435c4426c82019669c476f5c76088.zip |
Renamed namespace back to Ice
Diffstat (limited to 'cppe/demo/IceE/workqueue/WorkQueue.cpp')
-rw-r--r-- | cppe/demo/IceE/workqueue/WorkQueue.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/cppe/demo/IceE/workqueue/WorkQueue.cpp b/cppe/demo/IceE/workqueue/WorkQueue.cpp index 97e2734796a..7669714cfda 100644 --- a/cppe/demo/IceE/workqueue/WorkQueue.cpp +++ b/cppe/demo/IceE/workqueue/WorkQueue.cpp @@ -17,7 +17,7 @@ using namespace std; -class WorkQueue : public IceE::Thread +class WorkQueue : public Ice::Thread { public: @@ -36,14 +36,14 @@ public: } printf("work item: %s\n", item.c_str()); - IceE::ThreadControl::sleep(IceE::Time::seconds(1)); + Ice::ThreadControl::sleep(Ice::Time::seconds(1)); } } void add(const string& item) { - IceE::Monitor<IceE::Mutex>::Lock lock(_monitor); + Ice::Monitor<Ice::Mutex>::Lock lock(_monitor); if(_queue.empty()) { _monitor.notify(); @@ -56,7 +56,7 @@ private: string nextItem() { - IceE::Monitor<IceE::Mutex>::Lock lock(_monitor); + Ice::Monitor<Ice::Mutex>::Lock lock(_monitor); while(_queue.empty()) { _monitor.wait(); @@ -68,11 +68,11 @@ private: } - IceE::Monitor<IceE::Mutex> _monitor; + Ice::Monitor<Ice::Mutex> _monitor; list<string> _queue; }; -typedef IceE::Handle<WorkQueue> WorkQueuePtr; +typedef Ice::Handle<WorkQueue> WorkQueuePtr; int main() @@ -80,7 +80,7 @@ main() try { WorkQueuePtr h = new WorkQueue(); - IceE::ThreadControl control = h->start(); + Ice::ThreadControl control = h->start(); printf("Pushing work items"); printf("."); fflush(stdout); h->add("item1"); @@ -98,7 +98,7 @@ main() printf("Waiting for WorkQueue to terminate\n"); control.join(); } - catch(const IceE::Exception& ex) + catch(const Ice::Exception& ex) { fprintf(stderr, "%s\n", ex.toString().c_str()); return EXIT_FAILURE; |