in reply to Re^2: possibility to overcome perl threads
in thread possibility to overcome perl threads

it's very hard to share objects between threads.

Could you describe the object(s) that you wish to share across threads? And why you feel the need to share them?

Please note: I'm not implying that there is never a need to do this; just asking for a description of a situation when it is necessary advantagous to do so?


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
RIP PCW It is as I've been saying!(Audio until 20090817)
  • Comment on Re^3: possibility to overcome perl threads

Replies are listed 'Best First'.
Re^4: possibility to overcome perl threads
by llancet (Friar) on Oct 30, 2009 at 13:39 UTC
    Actually, Tk objects. I want to change the appearance of UI while executing something on a worker thread...

      Then you asked the wrong question.

      Even if there were an alternative implemetation of threading to threads, it wouldn't help because Tk objects are not thread-safe.

      Indeed. most guis use a queuing mechanism to allow background threads to interact with the gui thread (singular), and that is an efficient and relatively easy thing to do using threads and Thread::Queue.


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.
        Thanks. But it seems Thread::XXX are for 5005 thread. Does it work well with threads?