Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Thread::Queue and objects

by kazin (Novice)
on Jan 14, 2005 at 16:04 UTC ( [id://422284]=note: print w/replies, xml ) Need Help??


in reply to Thread::Queue and objects

Thread::Queue::Any is likely what you were looking for.

Replies are listed 'Best First'.
Re^2: Thread::Queue and objects
by bronto (Priest) on Jan 14, 2005 at 16:25 UTC

    Thanks for the suggestion, which is a precious one since http://search.cpan.org seems to have bad bad problems currently and I couldn't dig it to find it myself.

    Unfortunately, that doesn't work...: I modified the program to use a T::Q::A to share the object and...

    bronto@brabham:~/tmp$ ./420587.pl --peerport 1081 thread failed to start: Can't store GLOB items at ../../lib/Storable.p +m (autosplit into ../../lib/auto/Storable/_freeze.al) line 287, at /u +sr/local/share/perl/5.8.4/Thread/Queue/Any.pm line 30

    :-(

    Ciao!
    --bronto


    In theory, there is no difference between theory and practice. In practice, there is.
Re^2: Thread::Queue and objects
by BrowserUk (Patriarch) on Jan 14, 2005 at 18:07 UTC

    Form my experience, Therad::Queue::Any never really did work with threads. It was designed for use with Forks.

    Besides which, all those modules that Storable Freeze/Thaw are slow and somewhat dubious when it comes to sharing either process global entities like filehandles, sockets,pieps etc., or blessed objects. If it were that easy to do, threads::shared would probably allow it.


    Examine what is said, not who speaks.
    Silence betokens consent.
    Love the truth but pardon error.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-04-24 19:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found