ttrpc-rust
ttrpc-rust copied to clipboard
[sync/server] wtc race maybe cause zero worker thread
Description of problem
wtc race maybe cause zero worker thread here. https://github.com/containerd/ttrpc-rust/blob/152ac12c30f65b79407d4411c40d8c86bc5ae949/src/sync/server.rs#L111
could reproduce it by add sleep 1s
before
https://github.com/containerd/ttrpc-rust/blob/152ac12c30f65b79407d4411c40d8c86bc5ae949/src/sync/server.rs#L112
Expected result
There is at least one worker thread for the accepted socket fd.
Actual result
Mabye there is no worker thread for the accepted socket fd.