{"action":"created","issue":{"url":"https://api.github.com/repos/Reactive-Extensions/RxCpp/issues/19","labels_url":"https://api.github.com/repos/Reactive-Extensions/RxCpp/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/Reactive-Extensions/RxCpp/issues/19/comments","events_url":"https://api.github.com/repos/Reactive-Extensions/RxCpp/issues/19/events","html_url":"https://github.com/Reactive-Extensions/RxCpp/issues/19","id":37628446,"number":19,"title":"Compiling for iOS","user":{"login":"notlion","id":27721,"avatar_url":"https://avatars.githubusercontent.com/u/27721?v=3","gravatar_id":"","url":"https://api.github.com/users/notlion","html_url":"https://github.com/notlion","followers_url":"https://api.github.com/users/notlion/followers","following_url":"https://api.github.com/users/notlion/following{/other_user}","gists_url":"https://api.github.com/users/notlion/gists{/gist_id}","starred_url":"https://api.github.com/users/notlion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/notlion/subscriptions","organizations_url":"https://api.github.com/users/notlion/orgs","repos_url":"https://api.github.com/users/notlion/repos","events_url":"https://api.github.com/users/notlion/events{/privacy}","received_events_url":"https://api.github.com/users/notlion/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2014-07-11T05:10:06Z","updated_at":"2015-01-24T20:48:42Z","closed_at":null,"body":"Clang gives this error when compiling for iOS (arm64):\r\n\r\n```\r\nIn file included from ../deps/rxcpp/Rx/v2/src/rxcpp/rx.hpp:8:\r\nIn file included from ../deps/rxcpp/Rx/v2/src/rxcpp/rx-includes.hpp:124:\r\nIn file included from ../deps/rxcpp/Rx/v2/src/rxcpp/rx-scheduler.hpp:861:\r\n../deps/rxcpp/Rx/v2/src/rxcpp/schedulers/rx-currentthread.hpp:35:16: error: thread-local storage is unsupported for the current target\r\n        static RXCPP_THREAD_LOCAL current_thread_queue_type* queue;\r\n```\r\n\r\nVersion info (Xcode 5.1.1):\r\n```\r\nApple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)\r\nTarget: x86_64-apple-darwin13.2.0\r\nThread model: posix\r\n```\r\n\r\nI get this for both device and simulator builds. Apologies if Rx isn't supported on iOS yet. I'm curious to check it out!"},"comment":{"url":"https://api.github.com/repos/Reactive-Extensions/RxCpp/issues/comments/71336555","html_url":"https://github.com/Reactive-Extensions/RxCpp/issues/19#issuecomment-71336555","issue_url":"https://api.github.com/repos/Reactive-Extensions/RxCpp/issues/19","id":71336555,"user":{"login":"ildarsharafutdinov","id":1442901,"avatar_url":"https://avatars.githubusercontent.com/u/1442901?v=3","gravatar_id":"","url":"https://api.github.com/users/ildarsharafutdinov","html_url":"https://github.com/ildarsharafutdinov","followers_url":"https://api.github.com/users/ildarsharafutdinov/followers","following_url":"https://api.github.com/users/ildarsharafutdinov/following{/other_user}","gists_url":"https://api.github.com/users/ildarsharafutdinov/gists{/gist_id}","starred_url":"https://api.github.com/users/ildarsharafutdinov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ildarsharafutdinov/subscriptions","organizations_url":"https://api.github.com/users/ildarsharafutdinov/orgs","repos_url":"https://api.github.com/users/ildarsharafutdinov/repos","events_url":"https://api.github.com/users/ildarsharafutdinov/events{/privacy}","received_events_url":"https://api.github.com/users/ildarsharafutdinov/received_events","type":"User","site_admin":false},"created_at":"2015-01-24T20:48:42Z","updated_at":"2015-01-24T20:48:42Z","body":"@notlion, have you managed to test your solution for iOS?\r\n\r\nI'm not 100% sure, but:\r\n\r\n```\r\nstatic RXCPP_THREAD_LOCAL current_thread_queue_type* queue;\r\n```\r\n\r\nAs far as I understand there should be 1 instance of **queue** for each thread.\r\n\r\n```\r\nstatic thread_local_storage<current_thread_queue_type> queue;\r\n```\r\n\r\nHowever, in your solution there is a single copy of **queue** which is shared among all threads. And using **pthread_*** calls doesn't change the situation, because **thread_local_storage** constructor is called once and creates a single **key_**."}}