Last active
January 5, 2018 08:50
-
-
Save towry/19c7136eeaec1c9e34ed82f9bd231ea3 to your computer and use it in GitHub Desktop.
How to run the code in swift in infinite mode.
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
import PlaygroundSupport | |
public func playgroundShouldContinueIndefinitely() { | |
PlaygroundPage.current.needsInfiniteExecution = true | |
} |
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
/* | |
- https://developer.apple.com/documentation/corefoundation/1542011-cfrunlooprun | |
- https://blog.ibireme.com/2015/05/18/runloop/ | |
*/ | |
import Foundation | |
CFRunLoopRun() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment