kazu-yamamoto / http2

HTTP/2.0 library including HPACK
BSD 3-Clause "New" or "Revised" License
86 stars 23 forks source link

Fix leak in H2 manager #155

Open edsko opened 3 days ago

edsko commented 3 days ago

See ManagedThreads.

Closes #154.

kazu-yamamoto commented 1 day ago

I'm not completely sure but I guess that the true source of this leak is ThreadId. If so, we should use Weak ThreadId instead. See: https://kazu-yamamoto.hatenablog.jp/entry/2024/11/20/160218

kazu-yamamoto commented 1 day ago

Uhhm. Weak is not an instance of Eq and Ord. So, we cannot use Map, sigh.

kazu-yamamoto commented 1 day ago

We can convert ThreadId into Int via Show. Then we can use IntSet (Weak ThreadId, TimeoutHandle).

kazu-yamamoto commented 1 day ago

I guess that https://github.com/kazu-yamamoto/http2/tree/improve-manager fixes this thread leak.

edsko commented 18 hours ago

I guess that https://github.com/kazu-yamamoto/http2/tree/improve-manager fixes this thread leak.

I will try and let you know.