1
0
mirror of https://github.com/golang/go synced 2024-11-15 01:30:31 -07:00
go/src
David du Colombier adb384ad2c net: implement asynchonous cancelable I/O on Plan 9
This change is an experimental implementation of asynchronous
cancelable I/O operations on Plan 9, which are required to
implement deadlines.

There are no asynchronous syscalls on Plan 9. I/O operations
are performed with blocking pread and pwrite syscalls.

Implementing deadlines in Go requires a way to interrupt
I/O operations.

It is possible to interrupt reads and writes on a TCP connection
by forcing the closure of the TCP connection. This approach
has been used successfully in CL 31390.

However, we can't implement deadlines with this method, since
we require to be able to reuse the connection after the timeout.

On Plan 9, I/O operations are interrupted when the process
receives a note. We can rely on this behavior to implement
a more generic approach.

When doing an I/O operation (read or write), we start the I/O in
its own process, then wait for the result asynchronously. The
process is able to handle the "hangup" note. When receiving the
"hangup" note, the currently running I/O operation is canceled
and the process returns.

This way, deadlines can be implemented by sending an "hangup"
note to the process running the blocking I/O operation, after
the expiration of a timer.

Fixes #11932.
Fixes #17498.

Change-Id: I414f72c7a9a4f9b8f9c09ed3b6c269f899d9b430
Reviewed-on: https://go-review.googlesource.com/31521
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-11-12 05:44:36 +00:00
..
archive archive/tar: disable prefix field in Writer 2016-11-02 20:18:38 +00:00
bufio
builtin
bytes all: make copyright headers consistent with one space after period 2016-11-04 20:46:25 +00:00
cmd cmd/dist: add support for GOARCH=mips{,le} 2016-11-12 00:34:21 +00:00
compress all: sprinkle t.Parallel on some slow tests 2016-11-04 16:56:57 +00:00
container
context context: adjust tests to avoid importing "testing" in package context 2016-11-03 21:12:21 +00:00
crypto all: spell "marshal" and "unmarshal" consistently 2016-11-12 00:13:35 +00:00
database/sql
debug debug/elf: SPARC64 relocation type is only 8 bits 2016-11-10 22:58:49 +00:00
encoding all: spell "marshal" and "unmarshal" consistently 2016-11-12 00:13:35 +00:00
errors
expvar
flag
fmt
go runtime/pprof/internal: delete package gzip0 2016-11-11 16:58:05 +00:00
hash
html all: spell "marshal" and "unmarshal" consistently 2016-11-12 00:13:35 +00:00
image
index/suffixarray
internal internal/syscall/windows: add GetModuleFileName 2016-11-07 22:18:24 +00:00
io
log all: sprinkle t.Parallel on some slow tests 2016-11-04 16:56:57 +00:00
math all: spell "marshal" and "unmarshal" consistently 2016-11-12 00:13:35 +00:00
mime mime/multipart: test for overreading on a stream 2016-11-07 19:32:11 +00:00
net net: implement asynchonous cancelable I/O on Plan 9 2016-11-12 05:44:36 +00:00
os os: on Windows, don't fix long paths that aren't long 2016-11-08 23:06:17 +00:00
path path: document that filepath is recommended to manipulate filename paths 2016-11-08 18:36:52 +00:00
plugin plugin: fix doc example fmt usage 2016-11-05 00:23:55 +00:00
reflect reflect: rename, document TestUnaddressableField 2016-11-11 14:38:40 +00:00
regexp
runtime net: implement asynchonous cancelable I/O on Plan 9 2016-11-12 05:44:36 +00:00
sort
strconv
strings bytes, strings: update s390x code to match amd64 changes 2016-11-02 15:56:24 +00:00
sync sync: add example for Pool 2016-11-10 05:32:14 +00:00
syscall all: spell "marshal" and "unmarshal" consistently 2016-11-12 00:13:35 +00:00
testing testing: add T.Context method 2016-11-03 21:14:30 +00:00
text text/template: reintroduce implicit indirect of interface values in builtin funcs 2016-11-11 19:46:17 +00:00
time time: use 1e9 rather than 1e-9 in Duration calculations 2016-11-12 01:18:26 +00:00
unicode
unsafe unsafe: remove incorrect type conversion in docs 2016-11-07 18:54:14 +00:00
vendor/golang_org/x
all.bash
all.bat
all.rc
androidtest.bash
bootstrap.bash
buildall.bash
clean.bash
clean.bat
clean.rc
cmp.bash all: make copyright headers consistent with one space after period 2016-11-04 20:46:25 +00:00
iostest.bash
make.bash
make.bat
Make.dist
make.rc
naclmake.bash
nacltest.bash
race.bash
race.bat
run.bash
run.bat
run.rc