net/clientnb.cpp       |    9 +++------
 test/httpcrashtest.cpp |    1 -
 2 files changed, 3 insertions(+), 7 deletions(-)

New commits:
commit 8aa42bc1ba6ad4c645835c52f0aba6347dbdf978
Author:     Pranam Lashkari <lpra...@collabora.com>
AuthorDate: Wed Nov 20 16:03:15 2019 +0530
Commit:     Michael Meeks <michael.me...@collabora.com>
CommitDate: Mon May 4 13:57:46 2020 +0200

    killpoco: removed Poco::Thread from net directory
    
    Removed unused Poco/Thread.h header
    
    Change-Id: Iafcd32656f0153ec97a4db0fe0259e8b34f79add
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/83290
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Michael Meeks <michael.me...@collabora.com>

diff --git a/net/clientnb.cpp b/net/clientnb.cpp
index b63fcd5d5..6d8e7c494 100644
--- a/net/clientnb.cpp
+++ b/net/clientnb.cpp
@@ -35,7 +35,6 @@
 #include <Poco/Util/Option.h>
 #include <Poco/Util/OptionSet.h>
 #include <Poco/Runnable.h>
-#include <Poco/Thread.h>
 
 #include <Util.hpp>
 
@@ -44,7 +43,6 @@ using Poco::Net::HTTPRequest;
 using Poco::Net::HTTPResponse;
 using Poco::Net::WebSocket;
 using Poco::Runnable;
-using Poco::Thread;
 using Poco::Util::Application;
 
 const char *HostName = "127.0.0.1";
@@ -178,8 +176,7 @@ struct Client : public Poco::Util::Application
     {
         std::cerr << "testLadder\n";
         ThreadWorker ladder;
-        Thread thread;
-        thread.start(ladder);
+        std::thread thread([&ladder]{ladder.run();});
         thread.join();
     }
 
@@ -187,11 +184,11 @@ struct Client : public Poco::Util::Application
     {
         std::cerr << "testParallel\n";
         const int num = 10;
-        Thread snakes[num];
+        std::thread snakes[num];
         ThreadWorker ladders[num];
 
         for (size_t i = 0; i < num; i++)
-            snakes[i].start(ladders[i]);
+            snakes[i] = std::thread([&ladders, i]{ladders[i].run();});
 
         for (int i = 0; i < num; i++)
             snakes[i].join();
diff --git a/test/httpcrashtest.cpp b/test/httpcrashtest.cpp
index 3a69a96ba..1faa4b452 100644
--- a/test/httpcrashtest.cpp
+++ b/test/httpcrashtest.cpp
@@ -30,7 +30,6 @@
 #include <Poco/Net/Socket.h>
 #include <Poco/Path.h>
 #include <Poco/StreamCopier.h>
-#include <Poco/Thread.h>
 #include <Poco/URI.h>
 #include <cppunit/extensions/HelperMacros.h>
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to