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
46b2a376
Commit
46b2a376
authored
Dec 29, 2014
by
Kenton Varda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix weird linker issues.
parent
e22e5641
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
13 deletions
+24
-13
async-inl.h
c++/src/kj/async-inl.h
+3
-13
async.c++
c++/src/kj/async.c++
+21
-0
No files found.
c++/src/kj/async-inl.h
View file @
46b2a376
...
@@ -551,15 +551,11 @@ template <>
...
@@ -551,15 +551,11 @@ template <>
class
ArrayJoinPromiseNode
<
void
>
final
:
public
ArrayJoinPromiseNodeBase
{
class
ArrayJoinPromiseNode
<
void
>
final
:
public
ArrayJoinPromiseNodeBase
{
public
:
public
:
ArrayJoinPromiseNode
(
Array
<
Own
<
PromiseNode
>>
promises
,
ArrayJoinPromiseNode
(
Array
<
Own
<
PromiseNode
>>
promises
,
Array
<
ExceptionOr
<
_
::
Void
>>
resultParts
)
Array
<
ExceptionOr
<
_
::
Void
>>
resultParts
);
:
ArrayJoinPromiseNodeBase
(
~
ArrayJoinPromiseNode
();
kj
::
mv
(
promises
),
resultParts
.
begin
(),
sizeof
(
ExceptionOr
<
_
::
Void
>
)),
resultParts
(
kj
::
mv
(
resultParts
))
{}
protected
:
protected
:
void
getNoError
(
ExceptionOrValue
&
output
)
noexcept
override
{
void
getNoError
(
ExceptionOrValue
&
output
)
noexcept
override
;
output
.
as
<
_
::
Void
>
()
=
_
::
Void
();
}
private
:
private
:
Array
<
ExceptionOr
<
_
::
Void
>>
resultParts
;
Array
<
ExceptionOr
<
_
::
Void
>>
resultParts
;
...
@@ -776,12 +772,6 @@ Promise<Array<T>> joinPromises(Array<Promise<T>>&& promises) {
...
@@ -776,12 +772,6 @@ Promise<Array<T>> joinPromises(Array<Promise<T>>&& promises) {
heapArray
<
_
::
ExceptionOr
<
T
>>
(
promises
.
size
())));
heapArray
<
_
::
ExceptionOr
<
T
>>
(
promises
.
size
())));
}
}
inline
Promise
<
void
>
joinPromises
(
Array
<
Promise
<
void
>>&&
promises
)
{
return
Promise
<
void
>
(
false
,
kj
::
heap
<
_
::
ArrayJoinPromiseNode
<
void
>>
(
KJ_MAP
(
p
,
promises
)
{
return
kj
::
mv
(
p
.
node
);
},
heapArray
<
_
::
ExceptionOr
<
_
::
Void
>>
(
promises
.
size
())));
}
// =======================================================================================
// =======================================================================================
namespace
_
{
// private
namespace
_
{
// private
...
...
c++/src/kj/async.c++
View file @
46b2a376
...
@@ -885,6 +885,27 @@ Maybe<Exception> ArrayJoinPromiseNodeBase::Branch::getPart() {
...
@@ -885,6 +885,27 @@ Maybe<Exception> ArrayJoinPromiseNodeBase::Branch::getPart() {
return
kj
::
mv
(
output
.
exception
);
return
kj
::
mv
(
output
.
exception
);
}
}
ArrayJoinPromiseNode
<
void
>::
ArrayJoinPromiseNode
(
Array
<
Own
<
PromiseNode
>>
promises
,
Array
<
ExceptionOr
<
_
::
Void
>>
resultParts
)
:
ArrayJoinPromiseNodeBase
(
kj
::
mv
(
promises
),
resultParts
.
begin
(),
sizeof
(
ExceptionOr
<
_
::
Void
>
)),
resultParts
(
kj
::
mv
(
resultParts
))
{}
ArrayJoinPromiseNode
<
void
>::~
ArrayJoinPromiseNode
()
{}
void
ArrayJoinPromiseNode
<
void
>::
getNoError
(
ExceptionOrValue
&
output
)
noexcept
{
output
.
as
<
_
::
Void
>
()
=
_
::
Void
();
}
}
// namespace _ (private)
Promise
<
void
>
joinPromises
(
Array
<
Promise
<
void
>>&&
promises
)
{
return
Promise
<
void
>
(
false
,
kj
::
heap
<
_
::
ArrayJoinPromiseNode
<
void
>>
(
KJ_MAP
(
p
,
promises
)
{
return
kj
::
mv
(
p
.
node
);
},
heapArray
<
_
::
ExceptionOr
<
_
::
Void
>>
(
promises
.
size
())));
}
namespace
_
{
// (private)
// -------------------------------------------------------------------
// -------------------------------------------------------------------
EagerPromiseNodeBase
::
EagerPromiseNodeBase
(
EagerPromiseNodeBase
::
EagerPromiseNodeBase
(
...
...
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