So I manage to spawn some twenty thousand tasks to retrieve documents from a remote server and to store them in MarkLogic. I've also created a user interface with a progress bar to follow its progress (although this won't be used in production).
Now, what I'd like to do is to trigger an update of a summary document once all spawned tasks have executed. From my limited experience with ML, I cannot seem to find a satisfying solution to this challenge ... My ideas: - After the spawn call a function recursively which sleeps for some time and checks the number of tasks in the task queue, and once it's empty assumes "that that's that" and updates/creates a document? - Have each spawned task inspect the task queue and if there is just one task in the queue (i.e. itself), trigger the document update? Hmmm, any better ideas? Thanks, Jakob. _______________________________________________ General mailing list [email protected] http://xqzone.com/mailman/listinfo/general
