mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 18:10:05 +00:00 
			
		
		
		
	Fixing additional thread lifetime issues
This commit is contained in:
		
							parent
							
								
									827a0eacf5
								
							
						
					
					
						commit
						7d021f72f3
					
				
					 4 changed files with 7 additions and 2 deletions
				
			
		|  | @ -119,7 +119,7 @@ public: | ||||||
|       settings_.setCacheDatabasePath(QString {cacheDbPath.c_str()}); |       settings_.setCacheDatabasePath(QString {cacheDbPath.c_str()}); | ||||||
|       settings_.setCacheDatabaseMaximumSize(20 * 1024 * 1024); |       settings_.setCacheDatabaseMaximumSize(20 * 1024 * 1024); | ||||||
|    } |    } | ||||||
|    ~MainWindowImpl() = default; |    ~MainWindowImpl() { threadPool_.join(); } | ||||||
| 
 | 
 | ||||||
|    void AsyncSetup(); |    void AsyncSetup(); | ||||||
|    void ConfigureMapLayout(); |    void ConfigureMapLayout(); | ||||||
|  |  | ||||||
|  | @ -48,6 +48,9 @@ public: | ||||||
|    { |    { | ||||||
|       std::unique_lock lock(refreshMutex_); |       std::unique_lock lock(refreshMutex_); | ||||||
|       refreshTimer_.cancel(); |       refreshTimer_.cancel(); | ||||||
|  |       lock.unlock(); | ||||||
|  | 
 | ||||||
|  |       threadPool_.join(); | ||||||
|    } |    } | ||||||
| 
 | 
 | ||||||
|    void HandleMessage(std::shared_ptr<awips::TextProductMessage> message); |    void HandleMessage(std::shared_ptr<awips::TextProductMessage> message); | ||||||
|  |  | ||||||
|  | @ -115,6 +115,8 @@ public: | ||||||
| 
 | 
 | ||||||
|       // Destroy ImGui Context
 |       // Destroy ImGui Context
 | ||||||
|       model::ImGuiContextModel::Instance().DestroyContext(imGuiContextName_); |       model::ImGuiContextModel::Instance().DestroyContext(imGuiContextName_); | ||||||
|  | 
 | ||||||
|  |       threadPool_.join(); | ||||||
|    } |    } | ||||||
| 
 | 
 | ||||||
|    void AddLayer(const std::string&            id, |    void AddLayer(const std::string&            id, | ||||||
|  |  | ||||||
|  | @ -35,7 +35,7 @@ public: | ||||||
|        radarProductManager_ {radarProductManager} |        radarProductManager_ {radarProductManager} | ||||||
|    { |    { | ||||||
|    } |    } | ||||||
|    ~RadarProductViewImpl() = default; |    ~RadarProductViewImpl() { threadPool_.join(); } | ||||||
| 
 | 
 | ||||||
|    boost::asio::thread_pool threadPool_ {1}; |    boost::asio::thread_pool threadPool_ {1}; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat