Umm, either you read me wrong, or theres some misunderstanding.
Objects/blessed scalars *do* work fine when shared, I can use them in more than one thread, no problem. The perldoc claims that 'bless' only blesses a thread local reference, and leaves the value in other threads, shared or not. This is plain untrue, according to my tests at least.
Update: Oops. I didnt test enough, it seems. The bless creates an object in each thread the object is shared in, but changes to one do not reflect in the other, so I guess they're not really shared after all. </darn>
I upgraded to 5.8.2 some time ago, while testing another thread problem, which core dumped in 5.8.1, this now works in 5.8.2. (See 5005threads -> ithreads (porting)) I hadnt used 5.8.1 much, because of the quick release of 5.8.2, and the fact that it is binary compatible with 5.8.0, unlike 5.8.1.
C.
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.