| Index: runtime/bin/eventhandler_win.cc
|
| diff --git a/runtime/bin/eventhandler_win.cc b/runtime/bin/eventhandler_win.cc
|
| index 81adcfdf4f582c629c78b8d7473d538c11ca9bbe..2cecd77f1c56280d3f9d3bd4a65f0cef1b3f0d93 100644
|
| --- a/runtime/bin/eventhandler_win.cc
|
| +++ b/runtime/bin/eventhandler_win.cc
|
| @@ -145,6 +145,12 @@ bool Handle::CreateCompletionPort(HANDLE completion_port) {
|
|
|
|
|
| void Handle::Close() {
|
| + if (!SupportsOverlappedIO()) {
|
| + // If the handle uses synchronous I/O (e.g. stdin), cancel any pending
|
| + // operation before closing the handle, so the read thread is not blocked.
|
| + BOOL result = CancelIoEx(handle_, NULL);
|
| + ASSERT(result);
|
| + }
|
| MonitorLocker ml(monitor_);
|
| if (!IsClosing()) {
|
| // Close the socket and set the closing state. This close method can be
|
|
|