Shariq,  Thanks for your reply, I think we can use the Shared memory if we have 
one file which has to be shared among all the process/thread, but my problem is 
i have 100's of files in directory and i need to store them all in a hash map 
and arrays. 
 
Also I need to malloc the arrays structure dynamically. Will this possible 
using the shared memory or there is any other technique for the same..?
 
Thanks, 
Jaysingh. 

Date: Wed, 3 Dec 2008 11:33:08 -0800From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: 
Re: Dyanamic loading of apache hash table.Hey Jaysingh,I am also running into 
this problem of having to reload some state in a module through a handler. As 
you mentioned - the problem here is that the loaded state is forked by the 
Apache process/thread structure and hence only the process/thread that serves 
the handler will reload its state.I am thinking of solving this problem in the 
following ways - 1) Maintain the state that needs to be reloaded in shared 
memory - so that all Apache processes/threads can read the same version. I am 
guessing this will be expensive.2) Terminate the processes/threads whose state 
has become obsolete.On top of the mod_rewrite recommended by someone else here, 
I think mod_perl does something similar too - because it has to look for 
modified Perl files on disk on every request.What are your 
thoughts?thanks,Shariq
On Wed, Dec 3, 2008 at 5:34 AM, Jayasingh Samuel <[EMAIL PROTECTED]> wrote:
Hai,I have a hash map which takes its input and key from a file. I store it on 
the server Startup.  Now the  file content will be changed automatically and i 
want to reload the hash map automatically after hitting some handler. What i 
see is, after reloading the hash map using the handler, iam able to see the new 
Contents and the old contents alternatively.All the thread process are not 
getting updated with the new changes.Please reply me 1. If you have solution 
for this to reload the hash map automatically.2. How to kill the old threads 
which is having the old hash map and to spawn new threads with the new 
Contents.Thanks in advance,Jaysingh Samuel
_________________________________________________________________Wish to Marry 
Now? Join MSN Matrimony FREE!http://in.msn.com/matrimony
_________________________________________________________________
Searching for the best deals on travel? Visit MSN Travel.
http://in.msn.com/coxandkings

Reply via email to