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
ad133cad
Commit
ad133cad
authored
May 20, 2014
by
Kenton Varda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make UnixEventPort accessible through AsyncIoContext.
parent
7450fc8b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
async-io.c++
c++/src/kj/async-io.c++
+3
-1
async-io.h
c++/src/kj/async-io.h
+6
-0
No files found.
c++/src/kj/async-io.c++
View file @
ad133cad
...
...
@@ -792,6 +792,8 @@ public:
Timer
&
getTimer
()
override
{
return
timer
;
}
UnixEventPort
&
getEventPort
()
{
return
eventPort
;
}
private
:
UnixEventPort
eventPort
;
EventLoop
eventLoop
;
...
...
@@ -987,7 +989,7 @@ AsyncIoContext setupAsyncIo() {
auto
lowLevel
=
heap
<
LowLevelAsyncIoProviderImpl
>
();
auto
ioProvider
=
kj
::
heap
<
AsyncIoProviderImpl
>
(
*
lowLevel
);
auto
&
waitScope
=
lowLevel
->
getWaitScope
();
return
{
kj
::
mv
(
lowLevel
),
kj
::
mv
(
ioProvider
),
waitScope
};
return
{
kj
::
mv
(
lowLevel
),
kj
::
mv
(
ioProvider
),
waitScope
,
lowLevel
->
getEventPort
()
};
}
}
// namespace kj
c++/src/kj/async-io.h
View file @
ad133cad
...
...
@@ -31,6 +31,8 @@
namespace
kj
{
class
UnixEventPort
;
class
AsyncInputStream
{
// Asynchronous equivalent of InputStream (from io.h).
...
...
@@ -296,6 +298,10 @@ struct AsyncIoContext {
Own
<
LowLevelAsyncIoProvider
>
lowLevelProvider
;
Own
<
AsyncIoProvider
>
provider
;
WaitScope
&
waitScope
;
UnixEventPort
&
unixEventPort
;
// TEMPORARY: Direct access to underlying UnixEventPort, mainly for waiting on signals. This
// field will go away at some point when we have a chance to improve these interfaces.
};
AsyncIoContext
setupAsyncIo
();
...
...
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