mirror of
				https://github.com/mik3y/usb-serial-for-android
				synced 2025-10-28 17:07:25 +00:00 
			
		
		
		
	really set thread priority in SerialInputOutputManager (#349)
This commit is contained in:
		
							parent
							
								
									cbed086279
								
							
						
					
					
						commit
						c06ccf70bc
					
				| @ -167,18 +167,16 @@ public class SerialInputOutputManager implements Runnable { | ||||
|      */ | ||||
|     @Override | ||||
|     public void run() { | ||||
|         if(mThreadPriority != Process.THREAD_PRIORITY_DEFAULT) | ||||
|             setThreadPriority(mThreadPriority); | ||||
| 
 | ||||
|         synchronized (this) { | ||||
|             if (getState() != State.STOPPED) { | ||||
|                 throw new IllegalStateException("Already running"); | ||||
|             } | ||||
|             mState = State.RUNNING; | ||||
|         } | ||||
| 
 | ||||
|         Log.i(TAG, "Running ..."); | ||||
|         try { | ||||
|             if(mThreadPriority != Process.THREAD_PRIORITY_DEFAULT) | ||||
|                 Process.setThreadPriority(mThreadPriority); | ||||
|             while (true) { | ||||
|                 if (getState() != State.RUNNING) { | ||||
|                     Log.i(TAG, "Stopping mState=" + getState()); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user