Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re: Sharing globs

by renodino (Curate)
on Oct 27, 2007 at 17:12 UTC ( #647611=note: print w/replies, xml ) Need Help??

in reply to Sharing globs

(The following is mostly supposition, based on my current experience implementing Thread::Sociable)
  1. threads::shared is based on tie()s, which don't completely support handles yet (tho 5.10 looks promising)
  2. How to deal with multiple threads writing to or esp. closing a handle (more complicated than just refcounting)
  3. The fact that the handle needs to be instantiated in the shared interpretter: how does it get there ? perhaps a new open(), e.g., shared_open() ? Or predeclare a lexical handle variable as shared ?
  4. Maintaining the illusion of fork() on Windows
I've vague notions about trying to hack something via PerlIO layers and routing thru shared (or rather, sociable) scalars to an I/O object, but need to better understand how the clone operation works. (and based on some recent p5p posts, it appears PerlIO isn't entirely thread-safe).

However, the tie() approach w/ special open() to install things into the shared interpretter is looking more attractive to me (despite the beached whale issue aka the global shared interpretter lock), though its likely to require big gobs of XS/C.

Perl Contrarian & SQL fanboy

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://647611]
[karlgoethebier]: provocation in 2: market garden
LanX Hi hi hi
[erix]: german provocations seem visible to germans, I guess it's an improvement
[LanX]: Free Gelderland!
[erix]: haha
[LanX]: Èrnem rulez!

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (9)
As of 2018-04-24 08:52 GMT
Find Nodes?
    Voting Booth?