lib/polylock.js
function polylock (params) {

		if (params === undefined)
			params = {};

		this.queue       = new polylock_ll();
		this.ex_locks    = {};
		this.ex_reserved = {};
		this.sh_locks    = {};
		this.op_num      = 1;

		this.drain_for_writes = params.write_priority ? true : false;

	}
function polylock (params) {

		if (params === undefined)
			params = {};

		this.queue       = new polylock_ll();
		this.ex_locks    = {};
		this.ex_reserved = {};
		this.sh_locks    = {};
		this.op_num      = 1;

		this.drain_for_writes = params.write_priority ? true : false;

	}
function polylock ( params ) { if ( params === undefined ) params = { } ; this . queue = new polylock_ll ( ) ; this . ex_locks = { } ; this . ex_reserved = { } ; this . sh_locks = { } ; this . op_num = 1 ; this . drain_for_writes = params . write_priority ? true : false ; }
Construct a 'polylock' resource manager.

Optionally an object parameter may be passed with parameters.
The only key recognised is 'write_priority', which if set to true, causes
write locks to be prioritised over read locks.
Construct a polylock resource manager .