matomo-sdk-ios
matomo-sdk-ios copied to clipboard
[Question] Why need to execute on main thread?
Hi there,
I'm reading the latest source code and wondering why it requires running on the main thread. For example:
-
MatomoTracker
'sfunc queue(event: Event)
andfunc dispatchBatch()
-
MemoryQueue
's functions
I'm worrying that there may be a UI glitch while a huge amount of events are queued in a short period.
If the reason for using the main thread is for its serial queue, then can we use a serial background queue instead? The enqueue/dequeue/network functions should be fine running on a background thread, or is there any reason I'm not aware of?
Hi @nelson-dai-17Live, you are correct, it doesn't have to be the main thread. We could move this al into a single, serial background queue instead.
@brototyp Thanks for your kind reply, may I know if there is any timeline for this enhancement?
Hi @nelson-dai-17Live, there is not timeline for it now.
I am open for PRs on this any am happy to collaborate.