mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-26 10:32:56 +01:00
Remove trailing whitespace (#3668)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user