@Jens
https://gist.github.com/marpal/4a7c33c19827989773b7
The link to the longer session. What I happens in this session:
1) I leave the region in the background
2) The systems calls the callback didExitRegion, you can see the logging
"Left region" and "User saved". However CBL logging for the queueing is
never executed and the Pusher neither.
3) I bring app to foreground while outside the region, then CBL Push my
changes to the user, you will the the Pusher active.
4) I enter the region in foreground.
5) The system calls the callback didEnterRegion, you can see the logging
"Entered region" and "User saved". The difference is that while in
foreground CBL logs "Queuing #85 {u:avEhFiUL_H
#52-2feddb87edc85561009aefb8e5084033}"
6) Pusher is executed inmediatelly.
Is like if the notification for the change in the database is not received
when in the background and then the Pusher not triggered.
On Tuesday, January 20, 2015 at 3:07:33 PM UTC-2, Martin Palatnik wrote:
>
> I'll send you the gust with that. What I find weird is the timer is called
> after 60 secs, so the process is still running, and if I spin on a loop it
> will run also.
>
> On Tuesday, January 20, 2015 at 2:54:53 PM UTC-2, Jens Alfke wrote:
>>
>> I am 99% confident this doesn't have anything to do with threads; that's
>> just not how the OS app suspend/resume works. It suspends the entire
>> process at once. (Trying to suspend individual threads is a guaranteed
>> recipe for deadlock.)
>>
>> It looks to me as though your push replication is still suspended until
>> the app returns to the foreground, although I can't tell for sure from the
>> logs you posted. I'd need to see the logs from before the app was
>> backgrounded. Could you post a longer session? (But not directly to the
>> list; put it in a Gist or something like that.)
>>
>> —Jens
>
>
--
You received this message because you are subscribed to the Google Groups
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/mobile-couchbase/822e4330-a1a2-42e3-9f52-68533e08fe14%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.