Resurrecting an old thread - I think my problem is similar to Mario's.
I'm trying to create and use a where iterator in a forked subprocess. The
iterator initializes, and I am able to loop through its items, but hangs
when 'next' is called on the last item.
I installed a new version of numexpr with the fix for #33(1.4.1), but I'm
still having the same problem.
-Ben
On 27 September 2010 05:57, Francesc Alted <fal...@pytables.org> wrote:
> A Sunday 26 September 2010 19:24:30 Mario Juric escrigué:
> > Hi Francesc,
> > Thank you for the quick response (and the excellent code!).
> >
> > I thought the processes forked by multiprocessing.Process shared
> no
> > state, except explicitly through IPC (which is how they sidestep the
> > issues with GIL)? In principle those could even be on different
> > machines (using multiprocessing.Manager). So I'm not sure why
> > thread-safety is the issue.
>
> You are right. Threading is not the issue. I was not thinking clearly.
>
> > Also, in the original testcase, even if I comment out the call
> to
> > _worker() from the parent process (so that pytables are used _only_
> > from the child) the problem remains.
> >
> > Do either pytables or HDF5 do something internally that makes
> them
> > not work across a fork()?
>
> I've looked into this problem and tracked it down to the new multi-
> threading mode of Numexpr. It turns out that, when the multiprocess
> module creates subprocess, the threads are left in a stale state (I
> don't know exactly why yet).
>
> Anyway, I've opened a ticket for this:
>
> http://code.google.com/p/numexpr/issues/detail?id=33
>
> and, until a more elegant solution is devised, I've implemented a
> workaround in:
>
> http://code.google.com/p/numexpr/source/detail?r=239
>
> It seems to work for me. Please try it out and tell me if that works
> for your more complex setup too.
>
> --
> Francesc Alted
>
>
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing.
> http://p.sf.net/sfu/novell-sfdev2dev
> _______________________________________________
> Pytables-users mailing list
> Pytables-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pytables-users
>
------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand
malware threats, the impact they can have on your business, and how you
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Pytables-users mailing list
Pytables-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pytables-users