nl_tokens: Create the lock factory .
pl_tokens: function createLockFactory ( ) { // Create the per instance async lock. var <mask> = new AsyncLock ( ) ; // Make a random id var rid = crypto . randomBytes ( 16 ) . toString ( "hex" ) ; /**
     * Force a serial execution context.
     *
     * @param {Function} fn - The function to guard.
     * @param {Number} timeout - The max time to wait for the lock.
     */ return function lockFactory ( fn , timeout ) { return function protectedContext ( ) { lock . acquire ( "cs-guard-" + rid , function ( done ) { fn ( function ( ) { done ( null , 0 ) ; } ) ; } , NOOP , { timeout : timeout } ) ; } ; } ; }