Commit 1460bfb3 authored by Kenton Varda's avatar Kenton Varda

Deal with remaining TODO(now) / TODO(soon).

parent 5a2e1bb3
...@@ -159,7 +159,7 @@ public: ...@@ -159,7 +159,7 @@ public:
// where no calls are being made. There is no reason to wait for this before making calls; if // where no calls are being made. There is no reason to wait for this before making calls; if
// the capability does not resolve, the call results will propagate the error. // the capability does not resolve, the call results will propagate the error.
// TODO(soon): method(s) for Join // TODO(someday): method(s) for Join
protected: protected:
Client() = default; Client() = default;
...@@ -279,7 +279,7 @@ public: ...@@ -279,7 +279,7 @@ public:
// is no longer needed. `context` may be used to allocate the output struct and deal with // is no longer needed. `context` may be used to allocate the output struct and deal with
// cancellation. // cancellation.
// TODO(soon): Method which can optionally be overridden to implement Join when the object is // TODO(someday): Method which can optionally be overridden to implement Join when the object is
// a proxy. // a proxy.
protected: protected:
......
...@@ -135,7 +135,7 @@ inline kj::StringTree structString(StructReader reader) { ...@@ -135,7 +135,7 @@ inline kj::StringTree structString(StructReader reader) {
return structString(reader, rawSchema<T>()); return structString(reader, rawSchema<T>());
} }
// TODO(soon): Unify ConstStruct and ConstList. // TODO(cleanup): Unify ConstStruct and ConstList.
template <typename T> template <typename T>
class ConstStruct { class ConstStruct {
public: public:
......
...@@ -63,7 +63,6 @@ kj::Maybe<kj::Array<PipelineOp>> toPipelineOps(List<rpc::PromisedAnswer::Op>::Re ...@@ -63,7 +63,6 @@ kj::Maybe<kj::Array<PipelineOp>> toPipelineOps(List<rpc::PromisedAnswer::Op>::Re
op.pointerIndex = opReader.getGetPointerField(); op.pointerIndex = opReader.getGetPointerField();
break; break;
default: default:
// TODO(soon): Handle better?
KJ_FAIL_REQUIRE("Unsupported pipeline op.", (uint)opReader.which()) { KJ_FAIL_REQUIRE("Unsupported pipeline op.", (uint)opReader.which()) {
return nullptr; return nullptr;
} }
...@@ -1261,8 +1260,10 @@ private: ...@@ -1261,8 +1260,10 @@ private:
// message was received. In this case, the original import ID will already have been // message was received. In this case, the original import ID will already have been
// dropped and could even have been reused for another capability. Luckily, the // dropped and could even have been reused for another capability. Luckily, the
// resolution chain holds the capability we actually want. // resolution chain holds the capability we actually want.
KJ_IF_MAYBE(resolution, resolutionChain.findImport(importId)) { if (descriptor.which() == rpc::CapDescriptor::SENDER_PROMISE) {
return resolution->addRef(); KJ_IF_MAYBE(resolution, resolutionChain.findImport(importId)) {
return resolution->addRef();
}
} }
// No recent resolutions. Check the import table then. // No recent resolutions. Check the import table then.
...@@ -1289,9 +1290,6 @@ private: ...@@ -1289,9 +1290,6 @@ private:
kj::Own<RpcClient> result; kj::Own<RpcClient> result;
if (descriptor.which() == rpc::CapDescriptor::SENDER_PROMISE) { if (descriptor.which() == rpc::CapDescriptor::SENDER_PROMISE) {
// TODO(now): Check for pending `Resolve` messages replacing this import ID, and if
// one exists, use that client instead.
auto paf = kj::newPromiseAndFulfiller<kj::Own<ClientHook>>(); auto paf = kj::newPromiseAndFulfiller<kj::Own<ClientHook>>();
import.promiseFulfiller = kj::mv(paf.fulfiller); import.promiseFulfiller = kj::mv(paf.fulfiller);
paf.promise = paf.promise.attach(kj::addRef(*importClient)); paf.promise = paf.promise.attach(kj::addRef(*importClient));
...@@ -2334,7 +2332,6 @@ private: ...@@ -2334,7 +2332,6 @@ private:
answer.pipeline = kj::mv(promiseAndPipeline.pipeline); answer.pipeline = kj::mv(promiseAndPipeline.pipeline);
if (redirectResults) { if (redirectResults) {
// TODO(now): Handle exceptions, dummy.
auto resultsPromise = promiseAndPipeline.promise.then( auto resultsPromise = promiseAndPipeline.promise.then(
kj::mvCapture(context, [](kj::Own<RpcCallContext>&& context) { kj::mvCapture(context, [](kj::Own<RpcCallContext>&& context) {
return context->consumeRedirectedResponse(); return context->consumeRedirectedResponse();
......
...@@ -397,9 +397,9 @@ struct Finish { ...@@ -397,9 +397,9 @@ struct Finish {
# to support premature cancellation -- instead, the implementation may wait until the call # to support premature cancellation -- instead, the implementation may wait until the call
# actually completes and send a normal `Return` message. # actually completes and send a normal `Return` message.
# #
# TODO(soon): Should we separate (1) and (2)? It would be possible and useful to notify the # TODO(someday): Should we separate (1) and (2)? It would be possible and useful to notify the
# server that it doesn't need to keep around the response to service pipeline requests even # server that it doesn't need to keep around the response to service pipeline requests even
# though the caller hasn't yet finished processing the response. # though the caller still wants to receive it / hasn't yet finished processing it.
questionId @0 :QuestionId; questionId @0 :QuestionId;
# ID of the call whose result is to be released. # ID of the call whose result is to be released.
...@@ -780,11 +780,11 @@ struct Join { ...@@ -780,11 +780,11 @@ struct Join {
# A part of the join key. These combine to form the complete join key which is used to establish # A part of the join key. These combine to form the complete join key which is used to establish
# a direct connection. # a direct connection.
# TODO(now): Change this so that multiple parts can be sent in a single Join message, so that # TODO(before implementing): Change this so that multiple parts can be sent in a single Join
# if multiple join parts are going to cross the same connection they can be sent together, so that # message, so that if multiple join parts are going to cross the same connection they can be sent
# the receive can potentially optimize its handling of them. In the case where all parts are # together, so that the receive can potentially optimize its handling of them. In the case where
# bundled together, should the recipient be expected to simply return a cap, so that the caller # all parts are bundled together, should the recipient be expected to simply return a cap, so
# can immediately start pipelining to it? # that the caller can immediately start pipelining to it?
} }
# ======================================================================================== # ========================================================================================
...@@ -978,7 +978,7 @@ struct Exception { ...@@ -978,7 +978,7 @@ struct Exception {
# depending on the translations they perform. # depending on the translations they perform.
# #
# For interaction over the global internet between parties with no other prior arrangement, a # For interaction over the global internet between parties with no other prior arrangement, a
# particular set of bindings for these types is defined elsewhere. (TODO(soon): Specify where # particular set of bindings for these types is defined elsewhere. (TODO(someday): Specify where
# these common definitions live.) # these common definitions live.)
# #
# Another common network type is the two-party network, in which one of the parties typically # Another common network type is the two-party network, in which one of the parties typically
......
...@@ -163,7 +163,7 @@ public: ...@@ -163,7 +163,7 @@ public:
private: private:
TaskSet::ErrorHandler& errorHandler; TaskSet::ErrorHandler& errorHandler;
// TODO(soon): Use a linked list instead. // TODO(perf): Use a linked list instead.
std::map<Task*, Own<Task>> tasks; std::map<Task*, Own<Task>> tasks;
}; };
......
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