This repository has been archived by the owner on Jul 1, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test that stresses races during transport shutdown (#250)
Summary: Pull Request resolved: #250 This test wants to do two things: defer functions to the loop while the context is shutting down, and create new objects (connections and listeners) before and/or just after the closing. Both these operations interfere with a correct shutdown, and are tricky to handle. Transports however don't offer a way to directly defer functions, so we achieve it by attaching a read callback to the connection, and causing it to be called immediately by closing the connection. Transports also don't really allow to control timing of when something that is deferred to the loop will really run. To "work around" it we simply jam the context by creating new connections over and over and over at an insane rate. This test proved its worth by finding many issues in transport shutdown. Differential Revision: D25495683 fbshipit-source-id: 6cb4a01385bd23811457a99afab2915425d5ecd8
- Loading branch information