Async version of get_multi().
778685
def get_multi_async(cls, blob_keys, **ctx_options):
    """"""
    for blob_key in blob_keys:
      if not isinstance(blob_key, (BlobKey, basestring)):
        raise TypeError('Expected blob key, got %r' % (blob_key,))
    if 'parent' in ctx_options:
      raise TypeError('Parent is not supported')
    blob_key_strs = map(str, blob_keys)
    keys = [model.Key(BLOB_INFO_KIND, id) for id in blob_key_strs]
    return model.get_multi_async(keys, **ctx_options)
22414
function multi(cb) {
  // not chainable with a callback
  if(typeof cb === 'function') {
    return this.execute(Constants.MAP.multi.name, [], cb);
  }

  // chainable instance
  return new Multi(this);
}
560376
def _get_more(collection_name, num_to_return, cursor_id):
    """"""
    return b"".join([
        _ZERO_32,
        _make_c_string(collection_name),
        _pack_int(num_to_return),
        _pack_long_long(cursor_id)])
928364
function multi() {
		var multi = get_client().then(function (client) {
			return client.multi();
		});

		return {
			query: query,
			exec: exec
		};

		function query(cypher_query, parameters) {
			return multi.then(function (multi) {
				return query_with(multi, cypher_query, parameters);
			});
		}

		function exec() {
			return multi.then(function (multi) {
				return make_promise(multi.exec.bind(multi));
			});
		}
	}
220937
def Asyncme(func, n=None, interval=0, default_callback=None, loop=None):
    """"""
    return coros(n, interval, default_callback, loop)(func)
1097083
def asyncStarPmap(asyncCallable, iterable):
    
    results = []
    yield asyncStarParallel(asyncCallable, results.append, iterable)
    returnValue(results)
1319807
def get_async(cls, blob_key, **ctx_options):
    """"""
    if not isinstance(blob_key, (BlobKey, basestring)):
      raise TypeError('Expected blob key, got %r' % (blob_key,))
    if 'parent' in ctx_options:
      raise TypeError('Parent is not supported')
    return cls.get_by_id_async(str(blob_key), **ctx_options)
722305
def multi(self):
        
        if self.explicit_transaction:
            raise RedisError('Cannot issue nested calls to MULTI')
        if self.command_stack:
            raise RedisError('Commands without an initial WATCH have already '
                             'been issued')
        self.explicit_transaction = True
204715
def sync(func):
    """"""
    sync_timeout = 3600  # Match standard synchronous timeout.

    def wraps(*args, **kwargs):
        task = func(*args, **kwargs)
        task.wait_for_result(timeout=sync_timeout)
        result = json.loads(task.result)
        return result

    return wraps
1027719
def get_multi(*keys)
      check_keys = keys.flatten
      check_keys.compact!

      return {} if check_keys.empty?
      if block_given?
        get_multi_yielder(keys) {|k, data| yield k, data.first}
      else
        Hash.new.tap do |hash|
          get_multi_yielder(keys) {|k, data| hash[k] = data.first}
        end
      end
    end
203843
def get(self, **kwargs):
        ""
        kwargs.setdefault('limit', 1)
        return self._first(self.gather(**kwargs))
33974
def fetch_batch(self):
        
        inp, f = self.queue.get()
        nr_input_var = len(inp)
        batched, futures = [[] for _ in range(nr_input_var)], []
        for k in range(nr_input_var):
            batched[k].append(inp[k])
        futures.append(f)
        while len(futures) < self.batch_size:
            try:
                inp, f = self.queue.get_nowait()
                for k in range(nr_input_var):
                    batched[k].append(inp[k])
                futures.append(f)
            except queue.Empty:
                break   # do not wait

        for k in range(nr_input_var):
            batched[k] = np.asarray(batched[k])
        return batched, futures
1048885
def get_chunks(Array, Chunksize):
    """"""
    for i in range(0, len(Array), Chunksize):
        yield Array[i:i + Chunksize]
494311
def observe_multi(self, keys, master_only=False):
        """"""
        return _Base.observe_multi(self, keys, master_only=master_only)
729886
def multi_lpop(self, queue, number, transaction=False):
        '''  '''
        try:
            self._multi_lpop_pipeline(self, queue, number)
        except:
            raise
870434
def map_return(self):
        """"""
        with Pool(self.cpu_count) as pool:
            vals = pool.map(self._func, self._iterable)
            pool.close()
            return vals
662142
function multiread(stream, get) {
    if (stream._multiread === undefined) {
        stream._multiread = stream._multiread || [];
        stream._multireading = stream._multireading || 0;
        stream._multireadmax = stream._multireadmax || concurrency;
    }
    if (stream._multiread.length) {
        push();
    } else {
        stream.once('_push', push);
    }
    while ((stream._multiread.length + stream._multireading) < stream._multireadmax) {
        stream._multireading++;
        if (!get(done)) break;
    }

    function done(item) {
        stream._multireading--;
        if (item === null && !stream._multireading) {
            stream.emit('_push');
        } else if (item) {
            stream._multiread.push(item);
            stream.emit('_push');
        }
    }

    function push() {
        if (stream._multiread.length) {
            stream.push(stream._multiread.shift());
        } else {
            stream.push(null);
        }
    }
}