(The following is mostly supposition, based on my current experience
implementing Thread::Sociable)
- threads::shared is based on tie()s, which don't completely support
handles yet (tho 5.10 looks promising)
- How to deal with multiple threads writing to or esp. closing a handle
(more complicated than just refcounting)
- 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 ?
- 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
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.