- varnish-cache: https://github.com/varnishcache/varnish-cache
- memcached: https://github.com/memcached/memcached
- beanstalkd: https://github.com/kr/beanstalkd
- kafka: http://kafka.apache.org/
function run(generator) { | |
var it = generator(); | |
var obj = it.next(); | |
(function _run() { | |
if (!obj.done) { | |
obj.value.then(result => { | |
obj = it.next(result); | |
_run(); | |
}).catch(err => it.throw(err)); |
package com.test; | |
import java.util.Random; | |
import java.util.concurrent.Callable; | |
import java.util.concurrent.ExecutorService; | |
import java.util.concurrent.Executors; | |
public class AsyncFuture { | |
public static void main(String[] args) { | |
ExecutorService service = Executors.newFixedThreadPool(5); |
'use strict'; | |
const async = require('async'); | |
const Promise = require('bluebird'); | |
const db = { | |
app: [ | |
{ id: 10, name: 'twitter' }, | |
{ id: 11, name: 'facebook' }, | |
{ id: 12, name: 'google' } |