-// WikiDocument.prototype.lock = function() {
-// if(this._lock < 0) {
-// this._lock = Math.random();
-// this._context_lock = this._lock;
-// this._lock_count = 1;
-// return this._lock;
-// }
-//
-// // reentrant locks
-// if(this._context_lock === this._lock) {
-// this._lock_count += 1;
-// return this._lock;
-// }
-//
-// throw "Document operation in progress. Try again later."
-// };
-//
-// WikiDocument.prototype.unlock = function(lockNumber) {
-// if(this.locked === lockNumber) {
-// this._lock_count -= 1;
-//
-// if(this._lock_count === 0) {
-// this._lock = -1;
-// this._context_lock = -1;
-// };
-// return;
-// }
-// throw "Trying to unlock with wrong lockNumber";
-// };
-//
-// /*
-// * About to leave context of current lock.
-// */
-// WikiDocument.prototype.leaveContext = function() {
-// var old = this._context_lock;
-// this._context_lock = -1;
-// return old;
-// };
-