I need check whether pthread_t is main thread. I want do it from current thread (not from pthread_t which I need check and not from main thread).
My code (pt is pthread_t)
NSThread *thread = CFBridgingRelease(pt); // it works wrong
bool isMain = thread.isMainThread;
But I can't right convert pthread_t to NSThread.
How I can convert pthread_t to NSThread?
Or how I can check whether pthread_t is main thread?