Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Win32::MMF (Windows Memory Mapped File) Support for Perl

by NetWallah (Canon)
on Feb 06, 2004 at 00:35 UTC ( [id://326949]=note: print w/replies, xml ) Need Help??


in reply to (Updated Again) Win32::MMF - Memory Mapped File Support for Perl

This module looks promising. Thanks for providing the source - FYI - it compiled, installed and tested flawlessly on my XP machine using the dot net compiler.

I'm sure you are probably already considering providing an object-interface for this module - just in case you are not, let me be the first to whine on this subject... or even better - if I find time, I'll try to write an OO wrapper for this module. Let me know if your or anyone else has already started on such a persuit.

The Interface I'm thinking of would look like this:

my $MM = Win32::MMF->new("My (optional) Unique Namespace name"); # If unspecified, a new GUID would be used for namespace # Fork the child here -- Parent & Child share $MM. # In Parent ---- my $view = $MM->CreateView("Optional Unique Name"); my $err=$view->lock([$TIMEOUT]); # Optional, Prevent others from Writi +ng $view->write($Some_Scalar_Or_Ref,[$lock,$TIMEOUT]); $view->unlock(); $view->close(); $MM->close(); #--- In Child -- my $view = $MM->GetView("Optional Unique Name", \&$Optional_CallBack_R +ef); # Line above blocks if callback is not specified my $Data = $view->read(); $view->close(); $MM->close();

"When you are faced with a dilemma, might as well make dilemmanade. "

Replies are listed 'Best First'.
Re: Re: Win32::MMF (Windows Memory Mapped File) Support for Perl
by Roger (Parson) on Feb 06, 2004 at 00:53 UTC
    Hi NetWallah. Thanks for testing the module for me. :-D

    And thanks for sharing the idea of OO wrapper too. Yes I am in the process of writing the OO wrapper for the module at the moment. I will take your suggestion into consideration for the look and feel of the OO wrapper.

    I am thinking about the semaphore issue at the moment. I am thinking about whether to use the Win32::Semaphore module to implement the lock, or to roll my own inside the module XS. I am thinking about rolling my own to reduce the dependency on other modules.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://326949]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2024-03-29 11:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found