├── .gitignore ├── .travis.yml ├── LICENSE ├── README.md ├── _examples ├── async-await │ ├── 00-demo.js │ ├── 01-basic-operations.js │ ├── 02-buffering.js │ ├── 03-select-take.js │ ├── 04-select-take-send.js │ ├── 05-special-chans.js │ ├── 06-cancellation.js │ ├── 07-timeout.js │ ├── 08-batch.js │ ├── 09-batch-select.js │ ├── 10-writable-stream.js │ ├── 11-merge.js │ ├── 12-iterator.js │ ├── 13-generator.js │ ├── 14-async-generator.js │ ├── 15-select-loop.js │ └── 16-unidirectional.js ├── generators-co │ └── 02-buffering.js ├── promises │ └── 02-buffering.js └── utils.js ├── cochan.sublime-project ├── merge-algo.txt ├── package.json ├── run-example ├── src ├── chan.js ├── constants.js ├── event-emitter.js ├── index.js ├── iterator.js ├── merge.js ├── pool.js ├── pools.js ├── schedule.js ├── select.js ├── special-chans.js ├── thenable.js ├── unidirectional.js ├── utils.js └── writable-stream.js └── test ├── 00-test-helpers-scheduler.js ├── 01-basic-operations.js ├── 02-buffering.js ├── 03-take-sync.js ├── 04-send-sync.js ├── 05-closing.js ├── 06-maybe-can-take-sync.js ├── 07-maybe-can-send-sync.js ├── 08-chan-timeout.js ├── 09-select-sync.js ├── 10-select.js ├── 11-drain.js ├── 12-merge.js ├── 13-chan-delay.js ├── helpers ├── index.js └── scheduler.js └── internal ├── cancelling.js ├── send-intent.js └── thenable.js /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/.gitignore -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/.travis.yml -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/README.md -------------------------------------------------------------------------------- /_examples/async-await/00-demo.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/_examples/async-await/00-demo.js -------------------------------------------------------------------------------- /_examples/async-await/01-basic-operations.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/_examples/async-await/01-basic-operations.js -------------------------------------------------------------------------------- /_examples/async-await/02-buffering.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/_examples/async-await/02-buffering.js -------------------------------------------------------------------------------- /_examples/async-await/03-select-take.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/_examples/async-await/03-select-take.js -------------------------------------------------------------------------------- /_examples/async-await/04-select-take-send.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/_examples/async-await/04-select-take-send.js -------------------------------------------------------------------------------- /_examples/async-await/05-special-chans.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/_examples/async-await/05-special-chans.js -------------------------------------------------------------------------------- /_examples/async-await/06-cancellation.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/_examples/async-await/06-cancellation.js -------------------------------------------------------------------------------- /_examples/async-await/07-timeout.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/_examples/async-await/07-timeout.js -------------------------------------------------------------------------------- /_examples/async-await/08-batch.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/_examples/async-await/08-batch.js -------------------------------------------------------------------------------- /_examples/async-await/09-batch-select.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/_examples/async-await/09-batch-select.js -------------------------------------------------------------------------------- /_examples/async-await/10-writable-stream.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/_examples/async-await/10-writable-stream.js -------------------------------------------------------------------------------- /_examples/async-await/11-merge.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/_examples/async-await/11-merge.js -------------------------------------------------------------------------------- /_examples/async-await/12-iterator.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/_examples/async-await/12-iterator.js -------------------------------------------------------------------------------- /_examples/async-await/13-generator.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/_examples/async-await/13-generator.js -------------------------------------------------------------------------------- /_examples/async-await/14-async-generator.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/_examples/async-await/14-async-generator.js -------------------------------------------------------------------------------- /_examples/async-await/15-select-loop.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/_examples/async-await/15-select-loop.js -------------------------------------------------------------------------------- /_examples/async-await/16-unidirectional.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/_examples/async-await/16-unidirectional.js -------------------------------------------------------------------------------- /_examples/generators-co/02-buffering.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/_examples/generators-co/02-buffering.js -------------------------------------------------------------------------------- /_examples/promises/02-buffering.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/_examples/promises/02-buffering.js -------------------------------------------------------------------------------- /_examples/utils.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/_examples/utils.js -------------------------------------------------------------------------------- /cochan.sublime-project: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/cochan.sublime-project -------------------------------------------------------------------------------- /merge-algo.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/merge-algo.txt -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/package.json -------------------------------------------------------------------------------- /run-example: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/run-example -------------------------------------------------------------------------------- /src/chan.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/src/chan.js -------------------------------------------------------------------------------- /src/constants.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/src/constants.js -------------------------------------------------------------------------------- /src/event-emitter.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/src/event-emitter.js -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/src/index.js -------------------------------------------------------------------------------- /src/iterator.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/src/iterator.js -------------------------------------------------------------------------------- /src/merge.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/src/merge.js -------------------------------------------------------------------------------- /src/pool.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/src/pool.js -------------------------------------------------------------------------------- /src/pools.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/src/pools.js -------------------------------------------------------------------------------- /src/schedule.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/src/schedule.js -------------------------------------------------------------------------------- /src/select.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/src/select.js -------------------------------------------------------------------------------- /src/special-chans.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/src/special-chans.js -------------------------------------------------------------------------------- /src/thenable.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/src/thenable.js -------------------------------------------------------------------------------- /src/unidirectional.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/src/unidirectional.js -------------------------------------------------------------------------------- /src/utils.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/src/utils.js -------------------------------------------------------------------------------- /src/writable-stream.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/src/writable-stream.js -------------------------------------------------------------------------------- /test/00-test-helpers-scheduler.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/test/00-test-helpers-scheduler.js -------------------------------------------------------------------------------- /test/01-basic-operations.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/test/01-basic-operations.js -------------------------------------------------------------------------------- /test/02-buffering.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/test/02-buffering.js -------------------------------------------------------------------------------- /test/03-take-sync.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/test/03-take-sync.js -------------------------------------------------------------------------------- /test/04-send-sync.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/test/04-send-sync.js -------------------------------------------------------------------------------- /test/05-closing.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/test/05-closing.js -------------------------------------------------------------------------------- /test/06-maybe-can-take-sync.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/test/06-maybe-can-take-sync.js -------------------------------------------------------------------------------- /test/07-maybe-can-send-sync.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/test/07-maybe-can-send-sync.js -------------------------------------------------------------------------------- /test/08-chan-timeout.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/test/08-chan-timeout.js -------------------------------------------------------------------------------- /test/09-select-sync.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/test/09-select-sync.js -------------------------------------------------------------------------------- /test/10-select.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/test/10-select.js -------------------------------------------------------------------------------- /test/11-drain.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/test/11-drain.js -------------------------------------------------------------------------------- /test/12-merge.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/test/12-merge.js -------------------------------------------------------------------------------- /test/13-chan-delay.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/test/13-chan-delay.js -------------------------------------------------------------------------------- /test/helpers/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/test/helpers/index.js -------------------------------------------------------------------------------- /test/helpers/scheduler.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/test/helpers/scheduler.js -------------------------------------------------------------------------------- /test/internal/cancelling.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/test/internal/cancelling.js -------------------------------------------------------------------------------- /test/internal/send-intent.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/test/internal/send-intent.js -------------------------------------------------------------------------------- /test/internal/thenable.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skozin/cochan/HEAD/test/internal/thenable.js --------------------------------------------------------------------------------