function(load) {
			var value, loading, handles = [],
				h;
			return function(handle) {
				if(!loading) {
					loading = true;
					load(function(v) {
						value = v;
						while(h = handles.shift()) {
							try {
								h && h.apply(null, [value]);
							} catch(e) {
								setTimeout(function() {
									throw e;
								}, 0)
							}
						}
					})
				}
				if(value) {
					handle && handle.apply(null, [value]);
					return value;
				}
				handle && handles.push(handle);
				return value;
			}
		}
function(load) {
			var value, loading, handles = [],
				h;
			return function(handle) {
				if(!loading) {
					loading = true;
					load(function(v) {
						value = v;
						while(h = handles.shift()) {
							try {
								h && h.apply(null, [value]);
							} catch(e) {
								setTimeout(function() {
									throw e;
								}, 0)
							}
						}
					})
				}
				if(value) {
					handle && handle.apply(null, [value]);
					return value;
				}
				handle && handles.push(handle);
				return value;
			}
		}
function ( load ) { var value , loading , handles = [ ] , h ; return function ( handle ) { if ( ! loading ) { loading = true ; load ( function ( v ) { value = v ; while ( h = handles . shift ( ) ) { try { h && h . apply ( null , [ value ] ) ; } catch ( e ) { setTimeout ( function ( ) { throw e ; } , 0 ) } } } ) } if ( value ) { handle && handle . apply ( null , [ value ] ) ; return value ; } handle && handles . push ( handle ) ; return value ; } }
根据加载函数实现加载器
@param {Function} load 加载函数
@returns {Function} 加载器
根据加载函数实现加载器
Load the value of a key