containerd / ttrpc-rust

Rust implementation of ttrpc (GRPC for low-memory environments)
Apache License 2.0
195 stars 45 forks source link

server: reap the exited connection thread synchronously #32

Closed lifupan closed 4 years ago

lifupan commented 4 years ago

When do server shutdown, the main thread would try to reap the connections thread before the connections thread taking the connections lock, which would cause a dead lock.

Using a synchronized thread to reap the exited connection thread to avoid the potential dead lock.

Fixes: #31

Signed-off-by: fupan.lfp fupan.lfp@antfin.com