I have a workaround that uses Tcl threads and it works for me and I'm confident it could work for you provided your rivet build was done with a threaded Tcl library.
Here is my proof of concept: a pool of 10 threads (you probably don't need that many) is started and then sits waiting for some task to be signaled through the ::thread::send call. Then the 'signal_threads' procedure is called and each thread is requested to run the procedure passed as second argument (my example simply sent a procedure that let a thread wait for a random interval thus emulating different tasks taking different times for their execution). I posted this procedure months ago to clarify that in principle mpm_prefork doesn't imply you can't use Tcl threads.
I added your synchronous code and it worked. Notice that with this approach you may be fetching data from multiple data sources at the same time.
caveats: you can call Rivet commands within a Tcl thread. Rivet commands are not recognized. Perhaps a package require should be issued I'm not keen to mix Tcl threads and the Apache framework: I suspect they wouldn't get along...
-- Massimo
<<< text/html; name="thread.rvt": Unrecognized >>>
--------------------------------------------------------------------- To unsubscribe, e-mail: rivet-dev-unsubscr...@tcl.apache.org For additional commands, e-mail: rivet-dev-h...@tcl.apache.org