Re: [perl-win32-gui-users] Win32: :GUI: :ThreadUtils integration in Win32: :GUI?

2006-12-08 Thread Jason Plum
Hmmm The trick here is in the doc's it states that -> my $hash : shared; -> doesnt share the contents of the has, because hashes aren't really more than pointers with names. associative arrays that aren't nested would work, but anythign that containts a pointer needs to have the variable

Re: [perl-win32-gui-users] Win32: :GUI: :ThreadUtils integration in Win32: :GUI?

2006-12-08 Thread Steve Loughran
btw - when you say "Always lock and/or mutex shared data!!", this isnt something I have come across yet. Can you explain how/what, or point me in the right direction? Steve

Re: [perl-win32-gui-users] Win32: :GUI: :ThreadUtils integration in Win32: :GUI?

2006-12-08 Thread Steve Loughran
Hi Jason All the hash data I would want to use is created once when I load a config file in (it is not touched at all after this point), so would passing the hash key via the queue, and having the worker use that key to process info out of a "static" hash be thread safe? As its my first vent

Re: [perl-win32-gui-users] Win32: :GUI: :ThreadUtils integration in Win32: :GUI?

2006-12-08 Thread Jason Plum
Steve, From WIK, thread->boss memory spaces are isolated by the perl interpreter's own threads. (aside from thread::shared modifications) Generally I do not use a hash to pass back and forth because of its data structure (pointers out the butt) and difficulty of placing locks on the data to p

Re: [perl-win32-gui-users] Win32: :GUI: :ThreadUtils integration in Win32: :GUI?

2006-12-08 Thread Steve Loughran
Thanks for that, that puts my mind at rest. Never having written any threaded/forked code before, I need to ask a few questions: - Is it safe for a "worker" thread to access hashes/arrays in the "boss" thread if they only need read access to them? - Any changes required to "boss" thread has