From 18907e41a0fc165cbb78afe8076ec58613043c3d Mon Sep 17 00:00:00 2001 From: YOANN AUDOUIN Date: Wed, 6 Sep 2023 14:36:44 +0200 Subject: [PATCH] Corrections for windows --- src/SMESH/SMESH_ParallelMesh.hxx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/SMESH/SMESH_ParallelMesh.hxx b/src/SMESH/SMESH_ParallelMesh.hxx index 3241a522b..7deb3210c 100644 --- a/src/SMESH/SMESH_ParallelMesh.hxx +++ b/src/SMESH/SMESH_ParallelMesh.hxx @@ -55,9 +55,14 @@ class SMESH_EXPORT SMESH_ParallelMesh: public SMESH_Mesh void wait() override {_pool->join(); DeletePoolThreads(); InitPoolThreads(); }; // Thread Pool +#ifndef WIN32 void InitPoolThreads() {_pool = new boost::asio::thread_pool(GetPoolNbThreads());}; - void DeletePoolThreads() {delete _pool;}; boost::asio::thread_pool* GetPool() {return _pool;}; +#else + void InitPoolThreads() {}; + void* GetPool() {return NULL;}; +#endif + void DeletePoolThreads() {delete _pool;}; int GetPoolNbThreads(); // Temporary folder @@ -112,10 +117,10 @@ class SMESH_EXPORT SMESH_ParallelMesh: public SMESH_Mesh // Mutex for multhitreading write in SMESH_Mesh #ifndef WIN32 boost::mutex _my_lock; -#endif - boost::filesystem::path tmp_folder; // thread pool for computation boost::asio::thread_pool * _pool = nullptr; +#endif + boost::filesystem::path tmp_folder; int _method = ParallelismMethod::MultiThread; -- 2.39.2