[plug] [OT] Perl Sub Modify Global Variable

Timothy White weirdo at tigris.org
Wed Feb 9 17:10:07 WST 2005


Cameron Patrick wrote:

>Timothy White wrote:
>
>
>
>>Ok. Still no luck.
>>It appears that because I am forking I can't share between forks. This
>>is a real bummer.
>>
>>
>
>That's what threads are for :)  Linux's threading in 2.4 is broken
>(well, doesn't quite behave as documented) in odd ways but if you don't
>stress it too hard it should be happy.
>
>Either that or keep one process with the "master" copy of the database
>and the others communicate through pipes or unix sockets to query it
>or alter it.  Go a bit further and you're half way to reimplementing
>mysql :P
>
>
Well it's only a very small database and the changes don't need to
remain between server uses.
I discovered that I need threads so I wrote a small script to start my
thread learning. I'm glad I did because I was trying to store the
database in a hash and I can't share that between threads.
Now to think of a better way to store the database in memory.

Tim

--
Tim White - Use the Fox, Luke!
PGP/GPG id: 602E944D, Pub Key Serv: subkeys.pgp.net
Fingerprint: 04C2 9682 B7B2 3006 009D  A9F3 067E EDCD 602E 944D
Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread!
--

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
URL: <http://lists.plug.org.au/pipermail/plug/attachments/20050209/87d77d02/attachment.pgp>


More information about the plug mailing list