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
d3869607
Commit
d3869607
authored
Nov 22, 2013
by
Kenton Varda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement embargoes.
parent
1c847b38
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
1 deletion
+23
-1
capability.c++
c++/src/capnp/capability.c++
+8
-1
capability.h
c++/src/capnp/capability.h
+6
-0
rpc.c++
c++/src/capnp/rpc.c++
+0
-0
rpc.capnp
c++/src/capnp/rpc.capnp
+9
-0
No files found.
c++/src/capnp/capability.c++
View file @
d3869607
...
@@ -203,7 +203,9 @@ public:
...
@@ -203,7 +203,9 @@ public:
selfResolutionOp
(
loop
.
there
(
this
->
promise
.
addBranch
(),
selfResolutionOp
(
loop
.
there
(
this
->
promise
.
addBranch
(),
[
this
](
kj
::
Own
<
const
ClientHook
>&&
inner
)
{
[
this
](
kj
::
Own
<
const
ClientHook
>&&
inner
)
{
*
redirect
.
lockExclusive
()
=
kj
::
mv
(
inner
);
*
redirect
.
lockExclusive
()
=
kj
::
mv
(
inner
);
}))
{}
}))
{
selfResolutionOp
.
eagerlyEvaluate
(
loop
);
}
Request
<
ObjectPointer
,
ObjectPointer
>
newCall
(
Request
<
ObjectPointer
,
ObjectPointer
>
newCall
(
uint64_t
interfaceId
,
uint16_t
methodId
,
uint
firstSegmentWordSize
)
const
override
{
uint64_t
interfaceId
,
uint16_t
methodId
,
uint
firstSegmentWordSize
)
const
override
{
...
@@ -449,4 +451,9 @@ kj::Own<const ClientHook> Capability::Client::makeLocalClient(
...
@@ -449,4 +451,9 @@ kj::Own<const ClientHook> Capability::Client::makeLocalClient(
return
kj
::
refcounted
<
LocalClient
>
(
eventLoop
,
kj
::
mv
(
server
));
return
kj
::
refcounted
<
LocalClient
>
(
eventLoop
,
kj
::
mv
(
server
));
}
}
kj
::
Own
<
ClientHook
>
newLocalPromiseClient
(
kj
::
Promise
<
kj
::
Own
<
const
ClientHook
>>&&
promise
,
const
kj
::
EventLoop
&
loop
)
{
return
kj
::
refcounted
<
QueuedClient
>
(
loop
,
kj
::
mv
(
promise
));
}
}
// namespace capnp
}
// namespace capnp
c++/src/capnp/capability.h
View file @
d3869607
...
@@ -353,6 +353,12 @@ public:
...
@@ -353,6 +353,12 @@ public:
virtual
kj
::
Own
<
CallContextHook
>
addRef
()
=
0
;
virtual
kj
::
Own
<
CallContextHook
>
addRef
()
=
0
;
};
};
kj
::
Own
<
ClientHook
>
newLocalPromiseClient
(
kj
::
Promise
<
kj
::
Own
<
const
ClientHook
>>&&
promise
,
const
kj
::
EventLoop
&
loop
=
kj
::
EventLoop
::
current
());
// Returns a ClientHook that queues up calls until `promise` resolves, then forwards them to
// the new client. This hook's `getResolved()` and `whenMoreResolved()` methods will reflect the
// redirection to the eventual replacement client.
// =======================================================================================
// =======================================================================================
// Extend PointerHelpers for interfaces
// Extend PointerHelpers for interfaces
...
...
c++/src/capnp/rpc.c++
View file @
d3869607
This diff is collapsed.
Click to expand it.
c++/src/capnp/rpc.capnp
View file @
d3869607
...
@@ -441,6 +441,15 @@ struct Resolve {
...
@@ -441,6 +441,15 @@ struct Resolve {
union {
union {
cap @1 :CapDescriptor;
cap @1 :CapDescriptor;
# The object to which the promise resolved.
# The object to which the promise resolved.
#
# The sender promises that from this point forth, until `promiseId` is released, it shall
# simply forward all messages to the capability designated by `cap`. This is true even if
# `cap` itself happens to desigate another promise, and that other promise later resolves --
# messages sent to `promiseId` shall still go to that other promise, not to its resolution.
# This is important in the case that the receiver of the `Resolve` ends up sending a
# `Disembargo` message towards `promiseId` in order to control message ordering -- that
# `Disembargo` really needs to reflect back to exactly the object designated by `cap` even
# if that object is itself a promise.
exception @2 :Exception;
exception @2 :Exception;
# Indicates that the promise was broken.
# Indicates that the promise was broken.
...
...
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