mirror of
				https://git.wownero.com/wowlet/wowlet.git
				synced 2024-08-15 01:03:14 +00:00 
			
		
		
		
	FutureScheduler: update with upstream v0.17.1.3
This commit is contained in:
		
							parent
							
								
									ed47e8e05c
								
							
						
					
					
						commit
						cd96abe545
					
				
					 1 changed files with 8 additions and 0 deletions
				
			
		| 
						 | 
					@ -3,9 +3,17 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "scheduler.h"
 | 
					#include "scheduler.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <mutex>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <QThreadPool>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
FutureScheduler::FutureScheduler(QObject *parent)
 | 
					FutureScheduler::FutureScheduler(QObject *parent)
 | 
				
			||||||
    : QObject(parent), Alive(0), Stopping(false)
 | 
					    : QObject(parent), Alive(0), Stopping(false)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					    static std::once_flag once;
 | 
				
			||||||
 | 
					    std::call_once(once, []() {
 | 
				
			||||||
 | 
					        QThreadPool::globalInstance()->setMaxThreadCount(4);
 | 
				
			||||||
 | 
					    });
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
FutureScheduler::~FutureScheduler()
 | 
					FutureScheduler::~FutureScheduler()
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue