-
Notifications
You must be signed in to change notification settings - Fork 251
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JSRPC: Extend js-rpc-test to test over real sockets, and fix a bug.
Without creating a PendingEvent for every incoming RpcTarget, the IoContext may be canceled prematurely, because the system thinks that there's no way more events could arrive. This problem didn't come up when using direct service bindings because the PendingEvent system does not cancel the IoContext until the thread's event loop has been emptied, just before going back to the OS to wait for I/O. With local service bindings, the communications back and forth between the services all happens entirely in the local event loop without requiring any I/O, so the test completes before the PendingEvent system can kick in and cause a problem. When we use a real socket, communications between Workers requires actual OS I/O, so the PendingEvent has a chance to do its thing.
- Loading branch information
Showing
4 changed files
with
62 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters