Commit b51e1b61 authored by Kenton Varda's avatar Kenton Varda

Merge branch 'master' of github.com:kentonv/capnproto

parents e2e412a0 4f05f0f2
......@@ -590,7 +590,7 @@ public:
AnyPointer::Pipeline(kj::refcounted<BrokenPipeline>(exception)));
}
const void* getBrand() {
const void* getBrand() override {
return nullptr;
}
......@@ -615,7 +615,7 @@ public:
return VoidPromiseAndPipeline { kj::cp(exception), kj::refcounted<BrokenPipeline>(exception) };
}
kj::Maybe<ClientHook&> getResolved() {
kj::Maybe<ClientHook&> getResolved() override {
return nullptr;
}
......
......@@ -90,7 +90,7 @@ class EzRpcClient {
// Some of these restrictions will probably be lifted in future versions, but some things will
// always require using the low-level interfaces directly. If you are interested in working
// at a lower level, start by looking at these interfaces:
// - `kj::startAsyncIo()` in `kj/async-io.h`.
// - `kj::setupAsyncIo()` in `kj/async-io.h`.
// - `RpcSystem` in `capnp/rpc.h`.
// - `TwoPartyVatNetwork` in `capnp/rpc-twoparty.h`.
......
......@@ -431,7 +431,7 @@ private:
State state;
Own<PromiseNode> inner;
// In PRE_STEP1 / STEP1, a PromiseNode for a Promise<T>.
// In STEP1, a PromiseNode for a Promise<T>.
// In STEP2, a PromiseNode for a T.
Event* onReadyEvent = nullptr;
......
......@@ -473,7 +473,7 @@ AsyncIoContext setupAsyncIo();
//
// // And we can wait for the promise to complete. Note that you can only use `wait()`
// // from the top level, not from inside a promise callback.
// String text = textPromise.wait();
// String text = textPromise.wait(ioContext.waitScope);
// print(text);
// return 0;
// }
......
......@@ -148,7 +148,7 @@ void registerSignalHandler(int signum) {
void registerReservedSignal() {
registerSignalHandler(reservedSignal);
// We also disable SIGPIPE because users of UnixEventLoop almost certainly don't want it.
// We also disable SIGPIPE because users of UnixEventPort almost certainly don't want it.
while (signal(SIGPIPE, SIG_IGN) == SIG_ERR) {
int error = errno;
if (error != EINTR) {
......
......@@ -597,7 +597,7 @@ class EventLoop {
// return 0;
// }
//
// Most applications that do I/O will prefer to use `setupIoEventLoop()` from `async-io.h` rather
// Most applications that do I/O will prefer to use `setupAsyncIo()` from `async-io.h` rather
// than allocate an `EventLoop` directly.
public:
......
......@@ -54,10 +54,7 @@ public:
// attempt a non-blocking read or may just return zero. To force a read, use a non-zero minBytes.
// To detect EOF without throwing an exception, use tryRead().
//
// Cap'n Proto never asks for more bytes than it knows are part of the message. Therefore, if
// the InputStream happens to know that the stream will never reach maxBytes -- even if it has
// reached minBytes -- it should throw an exception to avoid wasting time processing an incomplete
// message. If it can't even reach minBytes, it MUST throw an exception, as the caller is not
// If the InputStream can't produce minBytes, it MUST throw an exception, as the caller is not
// expected to understand how to deal with partial reads.
virtual size_t tryRead(void* buffer, size_t minBytes, size_t maxBytes) = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment