Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
threads: expand thread-safe region for I/O #32309
This should hopefully cover most I/O operations that go through libuv (meaning that other operations like using IOStream files aren't part of this PR), to make them thread-safe.
The UDPSocket implementation of many things has been always wrong, this also fixes them.
This should hopefully cover most I/O operations which go through libuv to make them thread-safe. There is no scaling here, just one big global lock, so expect worse-than-single-threaded performance if doing I/O on multiple threads (as compared to doing the same work on one thread). The intention is to handle performance improvement incrementally later. It also necessarily redesigns parts of the UDPSocket implementation to properly handle concurrent (single-threaded) usage, as a necessary part of making it handle parallel (thread-safe) usage.