On 10/19/2010 6:15 AM, dsource.org wrote: > phobos commit, revision 2107 > > > user: schveiguy > > msg: Fixed static destructor so sockets aren't closed on every thread exit in > windows. (see bug 4344 and 4951) > > Fixed unlisted bug, there could be a race condition on linux with > gethostbyname and gethostbyaddr, now synchronizing entire processing of > hostent struct. > > http://www.dsource.org/projects/phobos/changeset/2107
There's a thread-safe version of gethostbyname, gethostbyname_r, that you could use to avoid having to syncronize those blocks. Or even better, migrate to getnameinfo on both linux and windows to move to the modern implementation. Your change is an improvement from unsafe use of a non-threadsafe api, but.. Later, Brad _______________________________________________ phobos mailing list [email protected] http://lists.puremagic.com/mailman/listinfo/phobos
