In our AsynchronousQueue class the QueueForIndexing method has an event handler argument that you can use to receive an event when the queue is empty, eg.
Code:
AsynchronousQueue.QueueForIndexing( document, (object sender, EventArgs e) => {
//do what you want to do here
});
I think you have your own custom implementation of our queue class, so you should be able to do this: you can call DocumentIndex.GetDocument(documentURI), but...
-make sure the DocumentIndex instance is the same one already working on the queue.
-this method is not trivial in terms of time complexity, so don't call it repeatedly (ie. don't poll it continuously)
Jim
-your feedback is helpful to other users, thank you!