asynchronous 0.6.4

Asynchronous library for D


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

Build Status

asynchronous

This library provides infrastructure for writing concurrent code using coroutines, multiplexing I/O access over sockets and other resources, running network clients and servers, and other related primitives.

It implements most of the python 3 [asyncio API](https://docs.python.org/3/library/asyncio.html).

API Reference

Can be found at: http://dcarp.github.io/asynchronous/index.html

Implementation status
  • Timers (done)
  • Futures, Tasks (done)
  • Sockets (done)
  • Streams (done)
  • Subprocesses (not implemented)
  • Locks and semaphores (done)
  • Queues (done)
Why yet another async library? What is wrong with vibe.d?
  • asynchronous is a library and not a framework
  • it is not web-oriented, compatible with std.socket
  • arguably nicer API
  • event loop start/stop control
  • uses @Coroutine UDA to mark functions that could trigger a task (fiber) switch, although this is not enforced by the compiler yet.
Examples and tutorials

Some small examples can be found in the test directory or as unittests. For larger examples please use the python resources. Just keep in mind that in contrast with Python in D a coroutine MUST NOT be called from outside of a task (it causes a run-time error on fiber switch). So you may need to add ensureFuture or EventLoop.createTask on the first calling level.

Authors:
  • Dragoş Carp
Dependencies:
libasync
Versions:
0.6.8 2018-Jun-27
0.6.7 2016-Nov-17
0.6.6 2016-Oct-13
0.6.5 2016-Jul-24
0.6.4 2016-Jun-13
Show all 28 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 729 downloads total

Score:
2.1
Short URL:
asynchronous.dub.pm