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: ...@@ -590,7 +590,7 @@ public:
AnyPointer::Pipeline(kj::refcounted<BrokenPipeline>(exception))); AnyPointer::Pipeline(kj::refcounted<BrokenPipeline>(exception)));
} }
const void* getBrand() { const void* getBrand() override {
return nullptr; return nullptr;
} }
...@@ -615,7 +615,7 @@ public: ...@@ -615,7 +615,7 @@ public:
return VoidPromiseAndPipeline { kj::cp(exception), kj::refcounted<BrokenPipeline>(exception) }; return VoidPromiseAndPipeline { kj::cp(exception), kj::refcounted<BrokenPipeline>(exception) };
} }
kj::Maybe<ClientHook&> getResolved() { kj::Maybe<ClientHook&> getResolved() override {
return nullptr; return nullptr;
} }
......
...@@ -90,7 +90,7 @@ class EzRpcClient { ...@@ -90,7 +90,7 @@ class EzRpcClient {
// Some of these restrictions will probably be lifted in future versions, but some things will // 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 // always require using the low-level interfaces directly. If you are interested in working
// at a lower level, start by looking at these interfaces: // 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`. // - `RpcSystem` in `capnp/rpc.h`.
// - `TwoPartyVatNetwork` in `capnp/rpc-twoparty.h`. // - `TwoPartyVatNetwork` in `capnp/rpc-twoparty.h`.
......
...@@ -431,7 +431,7 @@ private: ...@@ -431,7 +431,7 @@ private:
State state; State state;
Own<PromiseNode> inner; 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. // In STEP2, a PromiseNode for a T.
Event* onReadyEvent = nullptr; Event* onReadyEvent = nullptr;
......
...@@ -473,7 +473,7 @@ AsyncIoContext setupAsyncIo(); ...@@ -473,7 +473,7 @@ AsyncIoContext setupAsyncIo();
// //
// // And we can wait for the promise to complete. Note that you can only use `wait()` // // 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. // // from the top level, not from inside a promise callback.
// String text = textPromise.wait(); // String text = textPromise.wait(ioContext.waitScope);
// print(text); // print(text);
// return 0; // return 0;
// } // }
......
...@@ -148,7 +148,7 @@ void registerSignalHandler(int signum) { ...@@ -148,7 +148,7 @@ void registerSignalHandler(int signum) {
void registerReservedSignal() { void registerReservedSignal() {
registerSignalHandler(reservedSignal); 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) { while (signal(SIGPIPE, SIG_IGN) == SIG_ERR) {
int error = errno; int error = errno;
if (error != EINTR) { if (error != EINTR) {
......
...@@ -597,7 +597,7 @@ class EventLoop { ...@@ -597,7 +597,7 @@ class EventLoop {
// return 0; // 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. // than allocate an `EventLoop` directly.
public: public:
......
...@@ -54,10 +54,7 @@ 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. // 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(). // 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 // If the InputStream can't produce minBytes, it MUST throw an exception, as the caller is not
// 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
// expected to understand how to deal with partial reads. // expected to understand how to deal with partial reads.
virtual size_t tryRead(void* buffer, size_t minBytes, size_t maxBytes) = 0; 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