react-native/Libraries/WebSocket
Nick Lockwood 72b363d7fc Replaced isMainThread checks with a proper test for main queue
Summary:
As per https://twitter.com/olebegemann/status/738656134731599872, our use of "main thread" to mean "main queue" seems to be unsafe.

This diff replaces the `NSThread.isMainQueue` checks with dispatch_get_specific(), which is the recommended approach.

I've also replaced all use of "MainThread" terminology with "MainQueue", and taken the opportunity to deprecate the "sync" param of `RCTExecuteOnMainThread()`, which, while we do still use it in a few places, is incredibly unsafe and shouldn't be encouraged.

Reviewed By: javache

Differential Revision: D3384910

fbshipit-source-id: ea7c216013372267b82eb25a38db5eb4cd46a089
2016-06-06 07:58:36 -07:00
..
RCTWebSocket.xcodeproj Fix OSS iOS build 2016-02-17 07:38:33 -08:00
__mocks__ Fix WebSocket compatibility with event-target-shim ^1.0.5 2016-04-27 12:26:23 -07:00
__tests__ Update Jest APIs on fbsource 2016-04-27 19:16:32 -07:00
RCTSRWebSocket.h Backed out changeset 183744d2415b 2016-03-15 11:49:28 -07:00
RCTSRWebSocket.m Fix the Origin: header used in WebSocket requests. 2016-06-03 15:13:41 -07:00
RCTWebSocketExecutor.h Refactored module access to allow for lazy loading 2015-11-25 04:49:45 -08:00
RCTWebSocketExecutor.m Replaced isMainThread checks with a proper test for main queue 2016-06-06 07:58:36 -07:00
RCTWebSocketManager.h Enable persistent socket between packager and bridge (1/N). 2016-02-16 23:05:36 -08:00
RCTWebSocketManager.m Increase RN devtools retry timeout 2016-04-01 07:02:25 -07:00
RCTWebSocketModule.h Updated Websocket to use new event system 2016-05-12 08:30:24 -07:00
RCTWebSocketModule.m Updated Websocket to use new event system 2016-05-12 08:30:24 -07:00
WebSocket.js Updated Websocket to use new event system 2016-05-12 08:30:24 -07:00
WebSocketEvent.js Implement WebSocket module for Android. Fixes #2837 2015-10-07 08:36:22 -07:00