how to share variable like IPC::Shareable in win32 ?
am 03.09.2007 08:53:54 von lsyxI use IPC::Shareable to share Perl variables between processes in
linux.
But it can't work in windows.
thanks!
I use IPC::Shareable to share Perl variables between processes in
linux.
But it can't work in windows.
thanks!
Quoth lsyx
> I use IPC::Shareable to share Perl variables between processes in
> linux.
>
> But it can't work in windows.
If you want an interface similar to IPC::Shareable, where random
processes created independantly can locate the shared memory given an
appropriate ID, you may have some luck with Win32::MMF.
However, if your processes are all forked perl processes (that is, they
are all children of one parent), you can share variables by switching
from fork to threads and threads::shared. Fork is emulated using threads
under Win32 anyway.
Ben
On 9 3 , 9 27 , Ben Morrow
> Quoth lsyx
>
> > I use IPC::Shareable to share Perl variables between processes in
> > linux.
>
> > But it can't work in windows.
>
> If you want an interface similar to IPC::Shareable, where random
> processes created independantly can locate the shared memory given an
> appropriate ID, you may have some luck with Win32::MMF.
>
> However, if your processes are all forked perl processes (that is, they
> are all children of one parent), you can share variables by switching
> from fork to threads and threads::shared. Fork is emulated using threads
> under Win32 anyway.
>
> Ben
thanks so much! The Win32::MMF is what i want.Maybe I can try
threads::shared later. :)