Try executing DNS resolve tasks in a new thread to work around macOS hang.
This commit is contained in:
parent
e72b071057
commit
607bd1df09
|
@ -933,7 +933,7 @@ final class EventDriverDNS_GAI(Events : EventDriverEvents, Signals : EventDriver
|
||||||
l.callback = on_lookup_finished;
|
l.callback = on_lookup_finished;
|
||||||
auto events = () @trusted { return cast(shared)m_events; } ();
|
auto events = () @trusted { return cast(shared)m_events; } ();
|
||||||
auto t = task!taskFun(l, AddressFamily.UNSPEC, events, m_event);
|
auto t = task!taskFun(l, AddressFamily.UNSPEC, events, m_event);
|
||||||
try taskPool.put(t);
|
try t.executeInNewThread();//taskPool.put(t);
|
||||||
catch (Exception e) return DNSLookupID.invalid;
|
catch (Exception e) return DNSLookupID.invalid;
|
||||||
debug (EventCoreLogDNS) print("lookup handle: %s", handle);
|
debug (EventCoreLogDNS) print("lookup handle: %s", handle);
|
||||||
return handle;
|
return handle;
|
||||||
|
|
Loading…
Reference in a new issue