I didn't see it in the documentation, and I've been looking through example programs to find this out. How do I wait for a command to complete? For instance, I'm attempting to do an Export with the BaseX Java API. What I don't understand is how I can block execution until the command is finished... I looked quickly at Process and the Context class and did not find anything revealing.
Adrien, sorry for the late feedback. Usually, your code will always be blocked until the Export command has finished. If this doesn't match with your own experience, feel free to pass us on your source code.
Best, Christian
On Fri, Mar 12, 2010 at 4:17 PM, Adrien Guillon aj.guillon@gmail.com wrote:
I didn't see it in the documentation, and I've been looking through example programs to find this out. How do I wait for a command to complete? For instance, I'm attempting to do an Export with the BaseX Java API. What I don't understand is how I can block execution until the command is finished... I looked quickly at Process and the Context class and did not find anything revealing.
___________________________
Christian Gruen Universitaet Konstanz Department of Computer & Information Science D-78457 Konstanz, Germany Tel: +49 (0)7531/88-4449, Fax: +49 (0)7531/88-3577 http://www.inf.uni-konstanz.de/~gruen
Actually it was a misunderstanding of the documentation I suppose... I used Export("/.../filename.xml"), and the file silently would never be created. Instead I used Export("/.../", "filename.xml") and it worked just fine. I suspected a threading issue of some sort, but that wasn't it.
AJ
On Sat, Mar 13, 2010 at 6:14 AM, Christian Grün christian.gruen@gmail.com wrote:
Adrien, sorry for the late feedback. Usually, your code will always be blocked until the Export command has finished. If this doesn't match with your own experience, feel free to pass us on your source code.
Best, Christian
On Fri, Mar 12, 2010 at 4:17 PM, Adrien Guillon aj.guillon@gmail.com wrote:
I didn't see it in the documentation, and I've been looking through example programs to find this out. How do I wait for a command to complete? For instance, I'm attempting to do an Export with the BaseX Java API. What I don't understand is how I can block execution until the command is finished... I looked quickly at Process and the Context class and did not find anything revealing.
Christian Gruen Universitaet Konstanz Department of Computer & Information Science D-78457 Konstanz, Germany Tel: +49 (0)7531/88-4449, Fax: +49 (0)7531/88-3577 http://www.inf.uni-konstanz.de/~gruen
basex-talk@mailman.uni-konstanz.de