-
Notifications
You must be signed in to change notification settings - Fork 387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compiling for iOS #19
Comments
The __thread specifier is not supported on iOS (nor is thread_local). Perhaps can be replaced with pthread_setspecific, see here: http://alex.tapmania.org/2011/03/simple-thread-local-storage-with-pthreads.html |
Thanks, @cnlier. |
Pretty sure we'd like to run Rx everywhere. @kirkshoop will know for sure if there are other places, but a threadlocal typically used in the current thread scheduler https://github.com/Reactive-Extensions/RxCpp/blob/master/Rx/v2/src/rxcpp/schedulers/rx-currentthread.hpp also called trampoline scheduler https://github.com/Netflix/RxJava/blob/875cfd7d4cd90d2b9dfb58c782518f503497687e/rxjava-core/src/main/java/rx/schedulers/TrampolineScheduler.java (you can see the ThreadLocal there as well). |
Yep, we want rxcpp to work on iOS. The current thread scheduler appears to be the only place that uses thread local storage. We will get to this, but contributions are welcome! |
Got it compiling with pthreads last night via the post linked by @cnlier. Thanks! |
Nice. |
I'm also interested in getting this to compile on IOS - @notlion could you maybe put up a pull request with your changes to get it to compile, or walk me through what you did? |
I pushed my changes here: It compiles and the tests pass. I don't have much experience with threaded code, so I can't say if the implementation is correct or not. Let me know how it goes! |
If you sign the CLA http://cla.msopentech.com and submit the pull request I would be happy to review and merge this. |
Awesome. I'd be happy to submit a PR once I've had a chance to test out RxCpp a bit more. It's a little tough to get started due to the limited documentation. Your ofxRx project has been really helpful, though. I'm trying to learn by adapting it to Cinder. Thanks! |
Cinder is a great idea! I just pushed changes to ofxRx to add some debugging info to the app background. I look forward to a pull request :) |
@notlion I'd love to have a look at this as well, but I'm having even less success with building for iOS. how exactly are you going about it? |
@stefanfisk My experimental-ios branch should compile for iOS. Follow the instructions for Xcode in the Readme. |
@notlion, have you managed to test your solution for iOS? |
@ildarsharafutdinov Not outside of compilation. In the end I decided to go with a signals/slots implementation since my use case didn't require most of what RxCpp is capable of. |
@ValeryKopylov has applied this fix. 25dbb11 |
Clang gives this error when compiling for iOS (arm64):
Version info (Xcode 5.1.1):
I get this for both device and simulator builds. Apologies if Rx isn't supported on iOS yet. I'm curious to check it out!
The text was updated successfully, but these errors were encountered: