Waiting For Commands to Complete
Friday, 12 March 2010 · 3 messages · last reply 13 Mar 2010
AG
Adrien Guillon12 Mar 2010 17:16 #
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.
CG
Christian Grün13 Mar 2010 12:14 #
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
Quoted text · Adrien Guillon · 7 lines
On Fri, Mar 12, 2010 at 4:17 PM, Adrien Guillon <aj.guillon at 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
AG
Adrien Guillon13 Mar 2010 18:42 #
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
Quoted text · Christian Grün · 26 lines
On Sat, Mar 13, 2010 at 6:14 AM, Christian Grün <christian.gruen at 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 at 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 >
Written for BaseX 6. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery