in reply to How to share huge data structure between threads?
Well, you don't say how big huge is, so...Have you looked into IPC::Shareable? You can tie your hash to the shared memory region, and then just make sure you lock it appropriatly before reading/writing. I use this in multi process (not threads) programs and it works quite well for me.If the standard shared memory segment size is too small (32Mb?), you can increase it runtime by adjusting /proc/sys/kernel/shmmax or re-building the kernel
Cheers,
Rob
|
---|
Replies are listed 'Best First'. | |
---|---|
Re:^2 How to share huge data structure between threads?
by ph0enix (Friar) on Jan 13, 2003 at 08:49 UTC | |
by BrowserUk (Patriarch) on Jan 15, 2003 at 06:56 UTC | |
by LogicalChaos (Beadle) on Jan 15, 2003 at 05:59 UTC | |
by diotalevi (Canon) on Jan 15, 2003 at 14:33 UTC | |
by ph0enix (Friar) on Jan 15, 2003 at 09:30 UTC | |
Re: Re: How to share huge data structure between threads?
by Jeppe (Monk) on Jan 13, 2003 at 18:31 UTC | |
by LogicalChaos (Beadle) on Jan 15, 2003 at 06:08 UTC |
In Section
Seekers of Perl Wisdom