Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^4: Outside-in objects with Object::LocalVars (threads)

by xdg (Monsignor)
on Jul 30, 2005 at 08:54 UTC ( [id://479586]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Outside-in objects with Object::LocalVars (threads)
in thread Outside-in objects with Object::LocalVars

So apart from the object ID issues, which is valid for the current implementation of Perl ithreads and fairly easily addressed, your point is that it isn't thread-safe in general against some unimplemented, future version of Perl threading that shares virtual memory but whose other properties are as yet undefined? I'd say that's setting the standard a tad high. That said, your general impression might be correct -- and it's certainly led me to have a crash course on threads in Perl, so I appreciate the feedback

I think the question of whether the "localized globals" approach would work under a shared virtual memory thread depends mostly on the whether the dynamic scoping effects of local are localized to a thread or not. From reading Temporary Values via Local, I would tend to think that might be an important implementation feature -- otherwise, I would think that localizing "magic" variables like $/ and $| wouldn't be thread-safe in your broader definition either.

-xdg

Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2024-04-24 07:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found