[XESAM] Search spec updated. API CHANGE
Mikkel Kamstrup Erlandsen
mikkel.kamstrup at gmail.com
Sat Jul 7 14:02:54 PDT 2007
2007/7/2, Jos van den Oever <jvdoever at gmail.com>:
>
> 2007/6/30, Mikkel Kamstrup Erlandsen <mikkel.kamstrup at gmail.com>:
> > > The API change I shout about in the subject line is the fact that the
> > method StartSearch have been added so that you now have to issue this
> call
> > to start the search created by NewSearch.
>
> GetHits (in s search, in i num, out aav hits)
>
> Why is there no offset in this function? This is also a race issue. If
> i call GetHits() twice, I do not know which request arrives first and
> so the order of the hits may be wrong.
Sorry for the late reply I was on vacation :-)
I can't see how an offset would solve that issue. As far as I can see it is
inherent in any async api where you have to iterate over a set with async
calls.
It is the intent that the method should be regarded as read() function. You
just make your reply handler issue another GetHits if appropriate. So yes
you can code yourself into a race condition (that any async api has), but it
is easy to avoid.
Cheers,
Mikkel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/xdg/attachments/20070707/a585cc44/attachment.htm
More information about the xdg
mailing list