Commit Graph

9 Commits

Author SHA1 Message Date
Fantix King 5d41af8079 forcely add UV_HANDLE_READABLE on pipe_t
* in order to detect peer close on O_WRONLY pipe_t
* partially reverted d8fe153
* refs libuv/libuv#2058
* refs #317
* fixes #311, fixes #312
2020-05-13 20:06:44 -05:00
Yury Selivanov 0bb811d11f tests: Stop using @asyncio.coroutine in tests 2019-10-24 14:42:54 -04:00
Yury Selivanov b8fb1ef1d0 Enforce consistent code style with flake8 2019-02-16 09:18:25 -05:00
Pau Freixes c3a5ec8e8d Support for PY37 without contextvars.
This MR aligns the uvloop code to become compatible, not production
ready, with PY37 adding the following changes:

* Support for the new API used behind the set_debug function.

* Adds the context=None KW to those functions that will receive it
  when uvloop runs with PY37.

* Former asyncio.test_utils moved as an uvloop test resource.

--
Yury: the original PR for this change is #138.  I stripped out
all the CI bits and squashed all commits by hand.  The CI
will be addressed later.
2018-05-23 12:51:18 -04:00
Yury Selivanov 6128b960c3 tests: Fix hanging test_read_pty_output 2018-05-22 18:08:54 -04:00
Yury Selivanov 46dd8f38c8 Introduce new way of scheduling transport writes (3x faster!)
Instead of making a `write` syscall on each `transport.write`
call, we now have an internal buffer of queued write calls.

After all callbacks are done, or after the selector poll is
complete, we flush the buffers using as low number of syscalls
as possible.

We now use zero-copy aggressively.  For instance, writelines
doesn't concat all buffers into one bytes object; instead each
buffer passed to writelines will be repackaged and passed to
the writev syscall (along with all other buffered data).

This commit (+ 2 before this one) completes the refactoring
of transport writes.  Sequential writes of small buffers are now
~3x faster. For instance: transport.write 15360 buffers by
0.01 MB:

 - before:  0.32 seconds (466.87 MB/sec)
 - after:   0.09 seconds (1657.38 MB/sec)
2016-05-18 19:34:47 -04:00
claws f894ac7403 Fix code style in unittest 2016-05-07 11:05:33 -04:00
Yury Selivanov bc9bc0034a tests: Fix test_read_pty_output (emits error logs on Linux) 2016-04-12 13:12:50 -04:00
Yury Selivanov e293b283f8 Implement loop.connect_read_pipe and loop.connect_write_pipe 2016-04-10 18:26:28 -04:00