Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

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


Comment on Re: Sharing globs

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://647611]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (8)
As of 2014-12-27 01:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (176 votes), past polls