in reply to Re: Can't open($newfh, $mode_layers, '&' . fileno($fh))
in thread Can't open($newfh, $mode_layers, '&' . fileno($fh))

After a solid 8 hours spent chasing this issue (and the other issue RE: mixing layers and fileno open()'s), I've come to a similar conclusion. So I've thrown in the towel on trying to transparently marshal handles between threads.

While not a catastrophic loss (since app-specific marshalling is always possible), it is a frustrating situation. I suppose a heavyweight solution might wrap handles in their own apartment thread, and proxy all the operations (ala DBIx::Threaded), but I reckon there be dragons there as well...

  • Comment on Re^2: Can't open($newfh, $mode_layers, '&' . fileno($fh))