thanks, the problem though is digging deep enough into twisted to sort out how to implement that, and whether that means using twistd's tac files to initialize the app would have to be abandoned for something more custom for now, I subprocess a twistd foreground process, and exit the parent process and it all seems to work well enough
On Thu, Apr 14, 2011 at 2:05 PM, Andi Vajda <va...@apache.org> wrote: > > On Thu, 14 Apr 2011, Marcus wrote: > > in a previous post, a user expressed problems running pylucene in a twistd >> app (running as a daemon) >> I have similar issues. I didn't see an answer in the postings. >> Everything works fine when twistd runs in foreground mode (twistd >> --nodaemon) >> >> the trick would seem to be knowing where is the right place to run initVM. >> > > initVM() _must_ be run from the main thread before calling anything > involving the embedded JVM. > > env.attachCurrentThread() _must_ be run from any other thread before > calling anything involving the embedded JVM. > > Andi.. >