Hanson, Rob wrote:

>>Is there another module you would
>>recommend using for Win32 threading?
> 
> 
> Nothing that comes to mind other than mapping to a file (DB_File, and
> others).  I do recall a memory mapping module for Windows floating around
> several years ago, can't remember the name or if it was ever uploaded to
> CPAN.

Isn't there a shared memory module for Win32 ?

That and a semaphore should cover it.

I know Amine had Win32::MamMap (Jenda's site) - someone should get the
source or re-write it for the masses.

Barring that, the threads package should handle it if disk is too slow.

> -----Original Message-----
> From: Chuck Lee [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 29, 2003 10:53 AM
> To: [EMAIL PROTECTED]
> Subject: RE: Processes and hash references
> 
> 
> <snip>
> 
>>Another alternative is using threads, but they are only available in Perl
>>5.8, so I'm not sure if you will have them available.  Threads
>>allow your to
>>create another thread for the same process instead of forking a whole new
>>one.  It allows for locking and sharing of variables, which seems to be
>>exactly what you need.
> 
> </snip>
> 
> Thanks for the reply.  I am developing in the win32 environment, so I would
> like to use Win32::Process to thread the process.  However, I don't know if
> there's a way to send a hash ref to the threaded process or does it share
> the same memory space as the original process?  Is there another module you
> would recommend using for Win32 threading?
> 
> thanks
> Chuck
> 
> 
> 
>>-----Original Message-----
>>From: Hanson, Rob [mailto:[EMAIL PROTECTED]
>>Sent: July 29, 2003 10:46 AM
>>To: 'Chuck Lee'; [EMAIL PROTECTED]
>>Subject: RE: Processes and hash references
>>
>>
>>I don't have much experience with forking, but I don't believe you will be
>>able to update the has ref easily.  When you fork you are creating a new
>>copy of the app, including variable storage... so the hash in the forked
>>process would be different from the original.
>>
>>You should be able to use a shared hash though.  You should look
>>for memory
>>mapping modules and tied databases on CPAN, there are a few.
>>
>>Another alternative is using threads, but they are only available in Perl
>>5.8, so I'm not sure if you will have them available.  Threads
>>allow your to
>>create another thread for the same process instead of forking a whole new
>>one.  It allows for locking and sharing of variables, which seems to be
>>exactly what you need.
>>
>>But like I said, I have little experience with forking, just bits of
>>knowledge I have picked up here and there.  So hopefully someone can give
>>you a good recommendation.
>>
>>Rob
>>
>>-----Original Message-----
>>From: Chuck Lee [mailto:[EMAIL PROTECTED]
>>Sent: Monday, July 28, 2003 4:24 PM
>>To: [EMAIL PROTECTED]
>>Subject: Processes and hash references
>>
>>
>>Hi I'm not too familiar with spawning multiple processes in Perl,
>>but I was
>>looking for the best method to spawn a new process that will
>>inherit a hash
>>reference (ie: XML request object), process the request and will
>>update the
>>hash reference when finished.  So basically it will need to share the same
>>memory space as the calling process.  Is this possible?  If so, would fork
>>be the best method for doing this?


-- 
  ,-/-  __      _  _         $Bill Luebkert    Mailto:[EMAIL PROTECTED]
 (_/   /  )    // //       DBE Collectibles    Mailto:[EMAIL PROTECTED]
  / ) /--<  o // //      Castle of Medieval Myth & Magic http://www.todbe.com/
-/-' /___/_<_</_</_    http://dbecoll.tripod.com/ (Free site for Perl/Lakers)

_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to