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.