how to share variable like IPC::Shareable in win32 ?

L

lsyx

I use IPC::Shareable to share Perl variables between processes in
linux.

But it can't work in windows.

thanks!
 
B

Ben Morrow

Quoth lsyx said:
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
 
L

lsyx

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. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,291
Messages
2,571,455
Members
48,132
Latest member
KatlynC08

Latest Threads

Top