Cooperative unix system calls
This module transform non-cooperative functions of the standard library into cooperative ones by launching them into system threads.
Indeed, lots of functions of the Unix
modules, corresponding to
functions of the standard C library may take times to
complete. For example gethostbyname
may use DNS resolution,
users informations may be stored in a ldap database, ...
Since these functions are implemented (in the standard C library) using blocking IOs, if you use them directly, you program may hang.
Cooperative gethostbyname with cache (using Lwt_preemptive.detach)