You can create a lock by using flock
on one of your existing files (or create a special one fo this. Get the lock before you start the canculation and release it after the result was stored.
You can create a lock by using flock
on one of your existing files (or create a special one fo this. Get the lock before you start the canculation and release it after the result was stored.