When lock(-1) is called, we are suppose to lock the entire database. How do we unlock it? Can we assume unlock(-1) unlocks the entire database? - John Sinues
Or not implement unlock(-1) and put in your design.txt that lock(-1) should only be used for the server to shutdown the server, and that unlocking the records then would be pointless. Mark
Or not implement unlock(-1) and put in your design.txt that lock(-1) should only be used for the server to shutdown the server, and that unlocking the records then would be pointless.
What about the scenario when you have to add a record and you need to lock the whole database. Is it justified to assume that no records will be added at all in future.