> On Nov 13, 2017, at 5:24 PM, Matias Piipari <[email protected]> wrote:
> 
> 1. Are there any asynchronous callbacks involved in the C API level (for 
> example from database observers) which would fire (as a feature, not a bug) 
> on a different thread than the thread on which the database API calls are 
> otherwise executing? This would lead to some special considerations given the 
> V8 model of thread isolation.

Database/document observers can be called on another thread (specifically, on a 
thread on which a different C4Database is committing a transaction.)

Replication callbacks are called on background threads belonging to the 
replicator.

> 2. Is it correct that for any C4Slice / C4String / ... with malloced buf to 
> it, the C4 APIs I passed them to do not take ownership (i.e. that I am 
> responsible for freeing it at the end I created it)?

Yes. C4Slices are ephemeral. If you pass one to a function, LiteCore won't 
access that memory after the function returns.

—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/F24D749D-F52E-4FF9-9A62-287786F32132%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to