Last active
December 20, 2015 04:04
-
-
Save blinker13/160d0dcb0678c288e814 to your computer and use it in GitHub Desktop.
Small Swift 2.0 pthread example that does not work
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
| func foo(x:UnsafeMutablePointer<Void>) -> UnsafeMutablePointer<Void> { | |
| print("Hello World") | |
| return nil | |
| } | |
| let thread:UnsafeMutablePointer<pthread_t> = nil | |
| // | |
| pthread_create(thread, nil, foo, nil) | |
| pthread_join(thread.memory, nil) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This can run