I have a scenario in which 'N' number of independent code snippets need to be run repeatedly in a constant interval. Which one of the following will be more efficient?
-
One thread sending broadcasts repeatedly in a constant interval with N BroadcastRecievers registered for this action.
-
N number of threads running independently and running the code repeatedly.
Or is there a better method?
Aucun commentaire:
Enregistrer un commentaire