mirror of
				https://github.com/opennetworkinglab/onos.git
				synced 2025-10-26 22:01:13 +01:00 
			
		
		
		
	ThreadFactory with max priority
Change-Id: I0f220276734e845b282e6ed88975cb85563853e9
This commit is contained in:
		
							parent
							
								
									4c7fcdff5f
								
							
						
					
					
						commit
						a2a11cd9b5
					
				| @ -138,6 +138,19 @@ public abstract class Tools { | ||||
|                 .build(); | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|      * Returns a thread factory that produces threads with MAX_PRIORITY. | ||||
|      * | ||||
|      * @param factory backing ThreadFactory | ||||
|      * @return thread factory | ||||
|      */ | ||||
|     public static ThreadFactory maxPriority(ThreadFactory factory) { | ||||
|         return new ThreadFactoryBuilder() | ||||
|                 .setThreadFactory(factory) | ||||
|                 .setPriority(Thread.MAX_PRIORITY) | ||||
|                 .build(); | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|      * Returns true if the collection is null or is empty. | ||||
|      * | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user