Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
capnproto
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
capnproto
Commits
1460bfb3
Commit
1460bfb3
authored
Dec 05, 2013
by
Kenton Varda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Deal with remaining TODO(now) / TODO(soon).
parent
5a2e1bb3
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
17 deletions
+14
-17
capability.h
c++/src/capnp/capability.h
+2
-2
generated-header-support.h
c++/src/capnp/generated-header-support.h
+1
-1
rpc.c++
c++/src/capnp/rpc.c++
+2
-5
rpc.capnp
c++/src/capnp/rpc.capnp
+8
-8
async.c++
c++/src/kj/async.c++
+1
-1
No files found.
c++/src/capnp/capability.h
View file @
1460bfb3
...
@@ -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(so
on
): method(s) for Join
// TODO(so
meday
): 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(so
on
): Method which can optionally be overridden to implement Join when the object is
// TODO(so
meday
): Method which can optionally be overridden to implement Join when the object is
// a proxy.
// a proxy.
protected
:
protected
:
...
...
c++/src/capnp/generated-header-support.h
View file @
1460bfb3
...
@@ -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
:
...
...
c++/src/capnp/rpc.c++
View file @
1460bfb3
...
@@ -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,9 +1260,11 @@ private:
...
@@ -1261,9 +1260,11 @@ 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.
if
(
descriptor
.
which
()
==
rpc
::
CapDescriptor
::
SENDER_PROMISE
)
{
KJ_IF_MAYBE
(
resolution
,
resolutionChain
.
findImport
(
importId
))
{
KJ_IF_MAYBE
(
resolution
,
resolutionChain
.
findImport
(
importId
))
{
return
resolution
->
addRef
();
return
resolution
->
addRef
();
}
}
}
// No recent resolutions. Check the import table then.
// No recent resolutions. Check the import table then.
auto
&
import
=
connectionState
.
imports
[
importId
];
auto
&
import
=
connectionState
.
imports
[
importId
];
...
@@ -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
();
...
...
c++/src/capnp/rpc.capnp
View file @
1460bfb3
...
@@ -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(so
on
): Should we separate (1) and (2)? It would be possible and useful to notify the
# TODO(so
meday
): 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 tha
t
#
message, so that if multiple join parts are going to cross the same connection they can be sen
t
# t
he receive can potentially optimize its handling of them. In the case where all parts a
re
# t
ogether, so that the receive can potentially optimize its handling of them. In the case whe
re
#
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(so
on
): Specify where
# particular set of bindings for these types is defined elsewhere. (TODO(so
meday
): 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
...
...
c++/src/kj/async.c++
View file @
1460bfb3
...
@@ -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
;
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment