问题
Does the GcmListenerService
process the gcm
messages in parallel or sequentially? I know that normal Android services
run in the main thread. But does that also apply to GcmListenerService
?
回答1:
GcmListenerService processes messages in parallel in background threads, see the note in the docs that methods are invoked asynchronously. So you are able to do blocking tasks in onMessageReceived() without worrying about blocking future messages.
来源:https://stackoverflow.com/questions/35219490/android-gcmlistenerservice-parallel