On Fri, Jul 26, 2013 at 12:39 PM, Andreas Gal <[email protected]> wrote:
> You answered your own question. If I store passwords in a pouchdb
> replacing the current storage (which is very desirable and would
> greatly reduce complexity), and I am inside searchLogin() and I am
> supposed to immediately return a login, how do I do that from a
> pouchdb that is async and only has async backends. I can spin the
> event loop or I can block on pouchdb on a different thread. Both
> approaches suck.

OK, I see (I didn't understand that that was what you were proposing).
The other alternative would be to keep an in-memory cache of passwords
(so we can return them synchronously, but keep the storage backend
async). I imagine that might not fly on mobile, though?

Gavin
_______________________________________________
Sync-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/sync-dev

Reply via email to