mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 03:30:06 +00:00 
			
		
		
		
	Fixing additional thread lifetime issues
This commit is contained in:
		
							parent
							
								
									cc8377064f
								
							
						
					
					
						commit
						d58d3fc8e8
					
				
					 4 changed files with 7 additions and 2 deletions
				
			
		|  | @ -117,7 +117,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); | ||||||
|  |  | ||||||
|  | @ -108,6 +108,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