mirage / mirage-vnetif

Virtual network interface and software bridge for Mirage
ISC License
16 stars 14 forks source link

Temporary async readers #2

Open MagnusS opened 9 years ago

MagnusS commented 9 years ago

To avoid a deadlock in the mirage tcpip-stack I have implemented an async version of the backend as a temporary workaround (enable with Basic_backend.create ~use_async_readers:true ()). When this is enabled, calls to the listen-function are wrapped in Lwt.async. This means that write never blocks and that potentially a large number of reader threads may be started if the writer is faster than the readers. It works for tcpip though, as it adjusts its rate.