php 5.x syncronized record opening (no database)
i'm mostly informed java, c c++ there ways control wholly thread accessing apparatus during any given time. i'm hunt something identical nonetheless php 5.x.
to delineate problem example:
i have an ascii-file wholly stores number, value page bucket counter. during concentration deployment record simply reason 0. any opening value incremented one. idea keep lane page loads.
the problem comes users parallel accessing page containing counter. thread review tide value, let's contend 11, another thread b reads value, still 11. following initial thread increments review value writes 12 record closes it. following second thread b, increments review value, 11, gets 12 writes file. value 12 stored file, unequivocally should have 13.
in another programming libel i have solved controlling mutex. i know there mutexes, common memory funcionality biased modules. nonetheless i fortitude works "most servers" out there. height independent. hallowed many inexpensive web hosts. there good fortitude problem? there isn't, proceed take controlling database an option?
Comments
Post a Comment