Created
February 18, 2018 16:51
-
-
Save pietrocaselani/21239777155f011bc69a9d700ecafc1e to your computer and use it in GitHub Desktop.
Thread + RunLoop to work with Realm and RxSwift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final class ThreadWithRunLoop: Thread { | |
var runLoop: RunLoop! | |
override func main() { | |
runLoop = RunLoop.current | |
runLoop.add(Port(), forMode: .commonModes) | |
runLoop.run() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment