 147a375e28
			
		
	
	
	
	
	147a375e28* Move env utilities to `nano::env::...` * Env get_int helpers * Hardware concurrency override * App path override * Convert legacy calls to `nano::env::get (...)` * Use generic get * Inform about environment overrides * Consteval sanitizer info * Print stats logging info * Replace `get_env_threshold_or_default` * Allow overriding io threads from env variable * Ensure configured thread counts are in reasonable ranges * Use `std::clamp`
		
			
				
	
	
		
			26 lines
		
	
	
	
		
			547 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
	
		
			547 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #pragma once
 | |
| 
 | |
| #include <nano/lib/utility.hpp>
 | |
| 
 | |
| #include <boost/thread/thread.hpp>
 | |
| 
 | |
| #include <thread>
 | |
| 
 | |
| namespace nano
 | |
| {
 | |
| namespace thread_attributes
 | |
| {
 | |
| 	boost::thread::attributes get_default ();
 | |
| } // namespace thread_attributes
 | |
| 
 | |
| /**
 | |
|  * Number of available logical processor cores. Might be overridden by setting `NANO_HARDWARE_CONCURRENCY` environment variable
 | |
|  */
 | |
| unsigned hardware_concurrency ();
 | |
| 
 | |
| /**
 | |
|  * If thread is joinable joins it, otherwise does nothing
 | |
|  * Returns thread.joinable()
 | |
|  */
 | |
| bool join_or_pass (std::thread &);
 | |
| } // namespace nano
 |