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
97687a67
Commit
97687a67
authored
Dec 05, 2013
by
Kenton Varda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix stuff.
parent
fecb6086
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
16 deletions
+19
-16
async-io.c++
c++/src/kj/async-io.c++
+10
-6
async-unix.c++
c++/src/kj/async-unix.c++
+0
-2
async.h
c++/src/kj/async.h
+4
-3
mega-test-quick.cfg
mega-test-quick.cfg
+5
-5
No files found.
c++/src/kj/async-io.c++
View file @
97687a67
...
...
@@ -689,14 +689,15 @@ public:
case
EINTR
:
case
ENETDOWN
:
case
EPROTO
:
case
ENOPROTOOPT
:
case
EHOSTDOWN
:
case
ENONET
:
case
EHOSTUNREACH
:
case
EOPNOTSUPP
:
case
ENETUNREACH
:
case
ECONNABORTED
:
// The incoming connection is dead-on-arrival. Just ignore it.
case
ETIMEDOUT
:
// According to the Linux man page, accept() may report an error if the accepted
// connection is already broken. In this case, we really ought to just ignore it and
// keep waiting. But it's hard to say exactly what errors are such network errors and
// which ones are permanent errors. We've made a guess here.
goto
retry
;
default
:
...
...
@@ -764,8 +765,11 @@ public:
}
Own
<
ConnectionReceiver
>
listen
()
override
{
KJ_ASSERT
(
addrs
.
size
()
==
1
,
"Sorry, unimplemented: Binding listen socket to multiple addresses."
);
if
(
addrs
.
size
()
>
1
)
{
KJ_LOG
(
WARNING
,
"Bind address resolved to multiple addresses. Only the first address will "
"be used. If this is incorrect, specify the address numerically. This may be fixed "
"in the future."
,
addrs
[
0
].
toString
());
}
int
fd
=
addrs
[
0
].
socket
(
SOCK_STREAM
);
...
...
c++/src/kj/async-unix.c++
View file @
97687a67
...
...
@@ -293,11 +293,9 @@ void UnixEventPort::poll() {
threadCapture
=
&
capture
;
if
(
sigsetjmp
(
capture
.
jumpTo
,
true
))
{
// We received a signal and longjmp'd back out of the signal handler.
KJ_DBG
(
"unsuspend"
,
signalCount
);
sigdelset
(
&
waitMask
,
capture
.
siginfo
.
si_signo
);
gotSignal
(
capture
.
siginfo
);
}
else
{
KJ_DBG
(
"suspend"
,
signalCount
);
sigsuspend
(
&
waitMask
);
KJ_FAIL_ASSERT
(
"sigsuspend() shouldn't return because the signal handler should "
"have siglongjmp()ed."
);
...
...
c++/src/kj/async.h
View file @
97687a67
...
...
@@ -529,9 +529,10 @@ class EventLoop {
// EventLoop directly, but instead use `Promise`s to interact with it indirectly. See the
// documentation for `Promise`.
//
// Each thread can have at most one EventLoop. When an EventLoop is created, it becomes the
// default loop for the current thread. Async APIs require that the thread has a current
// EventLoop, or they will throw exceptions.
// Each thread can have at most one current EventLoop. To make an `EventLoop` current for
// the thread, create a `WaitScope`. Async APIs require that the thread has a current EventLoop,
// or they will throw exceptions. APIs that use `Promise::wait()` additionally must explicitly
// be passed a reference to the `WaitScope` to make the caller aware that they might block.
//
// Generally, you will want to construct an `EventLoop` at the top level of your program, e.g.
// in the main() function, or in the start function of a thread. You can then use it to
...
...
mega-test-quick.cfg
View file @
97687a67
linux-gcc-4.7 17
58
./super-test.sh tmpdir capnp-gcc-4.7 quick
linux-gcc-4.8 17
61
./super-test.sh tmpdir capnp-gcc-4.8 quick gcc-4.8
linux-clang 17
81
./super-test.sh tmpdir capnp-clang quick clang
mac 80
0
./super-test.sh remote beat caffeinate quick
cygwin 8
05
./super-test.sh remote Kenton@flashman quick
linux-gcc-4.7 17
71
./super-test.sh tmpdir capnp-gcc-4.7 quick
linux-gcc-4.8 17
74
./super-test.sh tmpdir capnp-gcc-4.8 quick gcc-4.8
linux-clang 17
94
./super-test.sh tmpdir capnp-clang quick clang
mac 80
7
./super-test.sh remote beat caffeinate quick
cygwin 8
12
./super-test.sh remote Kenton@flashman quick
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