-
Notifications
You must be signed in to change notification settings - Fork 29.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IPC deferred with larger payloads (macOS only) #30009
Comments
Can you explain why that's your expectation? Keep in mind that the behavior you observed on other platforms is not at all guaranteed behavior. |
Given 6 scenarios (Win/Linux/macOS × small/large payloads), when five out of the six behave the same I think it is reasonable to expect that the sole remaining case would behave in a consistent manner. The purpose of Except that in this one case on one platform it behaves differently.
It is hard to keep that in mind when I did not previously know it. I would appreciate links to sources that elaborate on this claim. Do you simply mean that the documentation on |
That's right and that's intentional. Apropos the documentation, this paragraph is relevant to your test case:
|
This seems to have been answered. |
When creating a child process with
fork()
and IPC messages sent inside a loop are received ~immediately by the parent when the data is 'small' (<8k?), but when the data is 'large' (>10k?) on macOS the parent process does not receive the messages until the loop has finished. On Windows and Linux no such problem occurs.Repro steps:
node server.js
using code below on macOS.curl http://localhost:8080/15
curl http://localhost:8080/123456
EXPECTED: Alternating send/receive messages in the console with interleaved timestamps.
ACTUAL: All send messages occur first, followed by all receive messages.
server.js
worker.js
Output of a run:
The text was updated successfully, but these errors were encountered: