mirror of https://github.com/oxen-io/session-ios
				
				
				
			
			You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			23 lines
		
	
	
		
			552 B
		
	
	
	
		
			Swift
		
	
			
		
		
	
	
			23 lines
		
	
	
		
			552 B
		
	
	
	
		
			Swift
		
	
| //
 | |
| //  Copyright (c) 2017 Open Whisper Systems. All rights reserved.
 | |
| //
 | |
| 
 | |
| import Foundation
 | |
| 
 | |
| /**
 | |
|  * We synchronize access to state in this class using this queue.
 | |
|  */
 | |
| public func assertOnQueue(_ queue: DispatchQueue) {
 | |
|     if #available(iOS 10.0, *) {
 | |
|         dispatchPrecondition(condition: .onQueue(queue))
 | |
|     } else {
 | |
|         // Skipping check on <iOS10, since syntax is different and it's just a development convenience.
 | |
|     }
 | |
| }
 | |
| 
 | |
| public func owsFail(_ message: String) {
 | |
|     Logger.error(message)
 | |
|     Logger.flush()
 | |
|     assertionFailure(message)
 | |
| }
 |