Add isMainThread
extension to check thread
#2262
Merged
isMainThread
extension to check thread
#2262