-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Generalized pipes, sendable managed types, simple IPC #4039
Conversation
I made some changes to the generic pipes interface. It's currently split into 4 traits:
|
Also, the TCP test case is probably the clearest example of how to use |
Nice! I am continually humbled. |
/** Receives a message if one is available, or returns `none` if | ||
the connection is closed. | ||
|
||
/** Receives a message, or returns `none` if |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: None
r=me with comments |
I've pushed everything now except the final test case that does IPC over stdio. It has problems on windows that I hope aren't insurmountable, as that was largely the point of the whole exercise. |
use -Zroot-dir instead of --remap-path-prefix for diagnostic dir handling
r? @pcwalton
This is a module called
flatpipes
, which provides a generic pipe for transporting values that can be converted to bytes.It can do several cool things:
The primary motivation is to create a high-level interface for communicating with a sandbox. In particular, I want to create a compiler interface that supports either in-process or out-of-process builds. Most users, including our build system, will need a sandboxed compiler to recover from LLVM assertion failures and to encapsulate thread-unsafety.
As an example, the final commit includes a test case that treats another process as an actor over stdio.