On Fri, Jan 26, 2001 at 11:33:56PM +0000, Alan Burlison wrote: > Nicholas Clark wrote: > > > Hmm. Maybe I'm missing something here. (I don't know much about threads) > > perl rapidly copies the data returned by gethostbyname into SVs > > If threaded perl had a gethostbyname mutex so that only one thread at > > a time could get into the area referencing the call to gethostbyname() > > and the returned (possibly static) structure, would this solve the > > problem (at least within perl, provided extengethostbynamesions don't call gethostbyname) > > Rapidly? What happens if gethostbyname needs a NIS lookup? Or an LDAP I said rapidly copies. That was all :-) I was aware that DNS lookup can be several seconds (or tens of) > lookup? Or a DNS lookup? What happens if I call a third party library > that does name lookup as well? Stuffed at that point. > Simple answer - No. On the basis that it only cures some of the symptoms (perl would no longer clash with perl using gethostbyname) but not the disease ("perl5's threading is irrevocably broken" I think that the term was Are you going to put that in an X mail header?) Nicholas ClarkThread Previous | Thread Next