Thanks for all the great help. I am fairly certain that I read somewhere that there is one interperter per Apache thread, but admitedly the documentation is fairly patchy :-) I guess I'll find out. As for thread-safeness: long assignement (long i = 100;) is not thread-safe in Java (I'm not joking) because it is broken down into two byte codes, so nothing shocks me anymore :-) I had though of the UPD server but discarded it as too prone to producing down time (yet another component to worry about). The flock solution sounds like the kind of solution I'm after. I'll give it a try. Zev Blut wrote: > Take advantage of your operating system and use File's flock features. > For example this code snippet should do what you are asking for: > > File.open("foo.txt", "w") do |f| > f.flock(File::LOCK_EX) > f.puts "Hello from #{Process.pid}" > f.flock(File::LOCK_UN) > end Thanks again for your help. Best regards, Frank -- Posted via http://www.ruby-forum.com/.