workaround for non-thread-safety of some functions in Network.BSD Various functions in Network.BSD are non-thread-safe, eg. getHostByName, because the underlying gethostbyname() provided by the C library uses static storage.  The workaround here is to use a giant lock around these functions.
workaround for non-thread-safety of some functions in Network.BSD
Various functions in Network.BSD are non-thread-safe,
eg. getHostByName, because the underlying gethostbyname() provided by
the C library uses static storage.  The workaround here is to use a
giant lock around these functions.

In some cases, even the API we provide is itself unsafe, relying on
implicit state (eg. getHostEntry), but this commit makes no attempt to
fix that.  We should deprecate this library in favour of a complete
replacement at some point (before 6.6 would be nice).

Thanks to Einar Kartunnen for the patch.

iquiw/network,Mikehunan/network,Mikehunan/network,iquiw/network,jspahrsummers/network