Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Does Moose co-operate well with threads?

by llancet (Friar)
on Jan 14, 2010 at 03:26 UTC ( [id://817329]=perlquestion: print w/replies, xml ) Need Help??

llancet has asked for the wisdom of the Perl Monks concerning the following question:

It seems that Moose object can be shared through this way:

$moose_obj = shared_clone $moose_obj;
as Moose object is based on shared hash.

However, is that means I have to say:

my $shared_obj = shared_clone MooseObj->new;
instead of get an already-shared object directly?

Replies are listed 'Best First'.
Re: Does Moose co-operate well with threads?
by stvn (Monsignor) on Jan 19, 2010 at 02:06 UTC

    I don't use threads so I can't really answer your question, however I have seen a few reports saying that Moose and threads do not always work well together. Currently none of the Moose core developers actually use threads and all generally believe them to be broken by design anyway. That said, we would still appreciate a bug report and failing test case if you can isolate one.

    You might want to look into something like POE or AnyEvent as an alternative approach to mulitprogramming, both these two modules are known to work well with Moose.

    -stvn

        Threads have nothing to do with that test at all. I am not sure what your talking about.

        And why didn't you file an actual bug report?

        -stvn
Re: Does Moose co-operate well with threads?
by kyle (Abbot) on Jan 14, 2010 at 21:54 UTC

    What happens when you try it?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://817329]
Approved by ww
Front-paged by ww
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (5)
As of 2024-03-29 13:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found