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
..
2016-04-28 05:48:21 -07:00
2015-09-18 15:04:28 -07:00
2016-03-17 10:35:28 -07:00
2015-11-11 06:44:30 -08:00
2016-03-01 09:44:37 -08:00
2016-05-31 12:58:25 -07:00
2016-05-31 12:58:25 -07:00
2016-02-29 10:09:54 -08:00