Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Changes between Version 2 and Version 3 of AsyncIO

larsivi (IP:
06/07/08 14:37:22 (11 years ago)



  • AsyncIO

    v2 v3  
    33Discussions and specifications for such functionality in Tango. 
     5== Early plans (no progress) == 
     7Further on, we're building an asynchronous I/O library based on Tango's IO abstractions with notifications sent on completion of I/O events. The plan for the first stage of development is to have an API capable of delivering I/O, timer and (possibly) Unix signal events to applications through delegates. It will be able to efficiently handle large numbers ( i.e. thousands) of active file descriptors/handles (sockets, pipes, etc.) on all the platforms that Tango supports. Initially the library will work both on Windows (using I/O completion ports) and on Linux (using epoll); we will then provide a Mac OS X and FreeBSD implementation (based on kqueue), and other platforms if there is enough interest from the community.  
     9During the second stage of development we will build a framework on top of the asynchronous I/O library that will be able to multiplex I/O jobs using Tango Fibers (i.e. lightweight or userspace threads). Each fiber waiting for I/O events will be suspended until the event is received, helping to avoid consuming excessive resources. The load from each fiber will be distributed among a pool of threads.  
     11The idea behind both libraries is to be able to efficiently implement network protocols that are either synchronous (HTTP, SMTP, etc.) and asynchronous (XMPP, etc.) in nature in both client and server applications. 
    513== User discussions / thoughts ==