Update POCO library.

This commit is contained in:
Sandu Liviu Catalin committed 2023-03-23 20:19:11 +02:00
1 parent 8d15f4b6e9
commit 233fc103f9
2521 files changed
+257092 -72789

No files matched your search

@@ -36,12 +36,12 @@ class WorkNotification: public Notification
{
public:
typedef AutoPtr<WorkNotification> Ptr;
WorkNotification(int data):
_data(data)
{
}
int data() const
{
return _data;
@@ -62,7 +62,7 @@ public:
_queue(queue)
{
}
void run()
{
Poco::Random rnd;
@@ -84,7 +84,7 @@ public:
else break;
}
}
private:
std::string _name;
NotificationQueue& _queue;
@@ -98,7 +98,7 @@ FastMutex Worker::_mutex;
int main(int argc, char** argv)
{
NotificationQueue queue;
// create some worker threads
Worker worker1("Worker 1", queue);
Worker worker2("Worker 2", queue);
@@ -114,15 +114,15 @@ int main(int argc, char** argv)
{
queue.enqueueNotification(new WorkNotification(i));
}
// wait until queue is empty and all threads are
// wait until queue is empty and all threads are
// waiting for new work.
while (!queue.empty()) Thread::sleep(200);
Thread::sleep(500);
// stop all worker threads
queue.wakeUpAll();
ThreadPool::defaultPool().joinAll();
return 0;
}