0001 // 0002 // ObservableConvertibleType+Blocking.swift 0003 // RxBlocking 0004 // 0005 // Created by Krunoslav Zaher on 7/12/15. 0006 // Copyright © 2015 Krunoslav Zaher. All rights reserved. 0007 // 0008 0009 import Foundation 0010 #if !RX_NO_MODULE 0011 import RxSwift 0012 #endif 0013 0014 extension ObservableConvertibleType { 0015 /** 0016 Converts an Observable into a `BlockingObservable` (an Observable with blocking operators). 0017 0018 - returns: `BlockingObservable` version of `self` 0019 */ 0020 @warn_unused_result(message="http://git.io/rxs.uo") 0021 public func toBlocking() -> BlockingObservable<E> { 0022 return BlockingObservable(source: self.asObservable()) 0023 } 0024 }