Call Taplytics async on `track` calls
ladanazita opened this issue · comments
Ladan Nasserian commented
To resolve @bbernberg deadlock issue:
Taplytics also dispatches to main thread synchronously within logEvent:value:metadata
method. To resolve this, we will wrap track
in
#define dispatch_main_async_safe(block)\
if ([NSThread isMainThread]) {\
block();\
} else {\
dispatch_async(dispatch_get_main_queue(), block);\
}