vibe-d / eventcore

High performance proactor event loop abstraction library
MIT License
60 stars 42 forks source link

Fix host lookups hanging with concurrency #151

Closed marcioapm closed 4 years ago

marcioapm commented 4 years ago

This addresses an extremely likely hang during startup of my app, while launching 8 concurrent requests in a 1-cpu vm.

Geod24 commented 4 years ago

Could you describe a bit more what happens ?

marcioapm commented 4 years ago

When I launch a few concurrent requests, all of them will do a DNS lookup at the same time, and almost 100% of the time at least 1 will hang forever, sometimes more. This seems to happen less frequently with more CPU cores, but I can't say for sure. This patch fixes it 100%, it no longer hangs.

marcioapm commented 4 years ago

870.33 | ldc-1.14.0 | CONFIG=select | macOS | failed

Any idea what's causing only this to fail? It seems completely unrelated to the patch...

Geod24 commented 4 years ago

It's a spurious failure. I retriggered it for you. Going to look at the code a bit later this week (I'm not so familiar with it hence my reluctance to merge).

marcioapm commented 4 years ago

It's a spurious failure. I retriggered it for you. Going to look at the code a bit later this week (I'm not so familiar with it hence my reluctance to merge).

:+1: