← Back to team overview

ubuntu-phone team mailing list archive

Re: Scopes questions

 

On 4 Nov 2014, at 13:19 , Robert Schroll <rschroll@xxxxxxxxx> wrote:

> Thanks, all, for the helpful explanations.  I think I'm finally starting to grok what's going on with scopes.  I need some time to digest everything you've told me, but I'll be back with more questions soon.
> 
> One comment: There seems to be several reasons to prefer asynchronous behavior, but the sample projects shipped with QtCreator and the tutorials on developer.ubuntu.com all use synchronous requests.  A simple example using asynchronous requests would be very helpful.  Obviously such an example will be a bit more complicated.  But we're already dealing with a system in which various things are happening in different threads.  Async requests ought to fit into this existing mindset pretty easily.

There is a demo in the unity-scopes-api tree, under demo/scope-D that uses an async implementation. It just queues the query and returns from run(), and the query is processed by a background thread.

It's difficult to provide concrete examples, since the possible ways to implement async queries is near enough infinite, and depends heavily on how the backend data source API works. But I believe there is an example using Qt in the works for the QtCreator template.

> On Mon, Nov 3, 2014 at 4:50 PM, Rodney Dawes <rodney.dawes@xxxxxxxxxxxxx> wrote:
>> I do think 100ms is probably to fast, personally. 300ms would be much
>> better, and on par with average users.
> 
> I'm happy to file a bug about this, if you can tell me which project to file it against.

That would be unity-scopes-shell.

Cheers,

Michi.

Follow ups

References