Thanks for the response Jens.  That's what I was suspecting was happening 
was a threading issue.  I think I fixed the threading issues I was having 
in the app by doing a dispatch_sync on a particular thread.  This should 
make CBL happy as it's always getting written to from the same thread but 
the synchronous dispatch should allow the code to wait for the block to 
return.  For the most part the code works fine when running the app on the 
device.

I tried changing the thread to be the main thread if running Kiwi Unit 
Tests and a DB thread if running the app on the device.  However for 
whatever reason this just froze the app when trying to get started to run 
the Unit Tests (not yet running any tests).  I haven't exhausted exploring 
the main thread route yet but it seems logical that the app may be blocked 
if the tests are also trying to run on the main thread.

I'm wondering now if Kiwi Unit Tests are doing something funny like running 
different parts of the app in different threads.  I would have thought they 
would just start up the app just like the simulator or device would and 
then potentially run the tests using different threads.  However I can't 
even get the app to load properly in Kiwi now as I disabled all of the test 
specs.  If anyone has any insight into this please let me know.  Thanks 
again Jens for the help.

On Tuesday, April 1, 2014 5:34:18 PM UTC-7, Jens Alfke wrote:
>
>
> On Apr 1, 2014, at 5:07 PM, David Quon <dav...@amcoonline.net<javascript:>> 
> wrote:
>
> I noticed this code works fine on Couchbase Lite Beta 2 and breaks with 
> Beta 3.
>
>
> That’s because I added much more rigorous thread-safety checks in beta 3, 
> because I was tired of all the questions about “why do I get this 
> database-is-busy warning?” ;-)
>
> —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 mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/760a7126-b5a4-4f71-a3bd-e1fd0f08931a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to