Carl Lerche and GitHub
3b27dc31d2
threadpool: move threadpool into tokio-executor ( #1452 )
...
The threadpool is behind a feature flag.
Refs: #1264
2019-08-15 13:09:02 -07:00
Douman and Carl Lerche
37131b2114
runtime: refactor thread-local setters ( #1449 )
2019-08-15 13:00:57 -07:00
Carl Lerche and GitHub
8538c25170
reactor: rename tokio-reactor -> tokio-net ( #1450 )
...
* reactor: rename tokio-reactor -> tokio-net
This is in preparation for #1264
2019-08-15 11:04:58 -07:00
Jakub Beránek and Carl Lerche
7b6438a172
tokio: rewrite print_each_packet example using async/await ( #1446 )
...
This PR fixes the print each packet example in tokio.
Refs: #1201
2019-08-15 10:42:34 -07:00
Carl Lerche and GitHub
9de7083be8
executor: move current-thread into crate ( #1447 )
...
The `CurrentThread` executor is exposed using a feature flag.
Refs: #1264
2019-08-15 09:52:25 -07:00
John Doneth and Carl Lerche
8d55f98f6f
udp: update tokio_udp::UdpFramed to std::future ( #1370 )
2019-08-14 11:18:21 -07:00
Taiki Endo and Carl Lerche
999a600494
io: add async BufReader/BufWriter ( #1438 )
2019-08-14 10:24:07 -07:00
Ilya Lakhin and Carl Lerche
fb9809c068
executor, threadpool: forward port fix from #1155 ( #1433 )
...
Add executor::exit, allowing other executors inside threadpool::blocking.
2019-08-13 21:12:49 -07:00
Douman and Carl Lerche
517162792f
macros: upgrade syn/quote ( #1432 )
2019-08-13 21:11:26 -07:00
Geoff Shannon and Carl Lerche
fe90d61446
test: add a block_on function to tokio-test ( #1431 )
2019-08-13 21:10:26 -07:00
Ivan Petkov and Carl Lerche
338b37884a
signal: Add SignalKind for registering signals more easily ( #1430 )
...
This avoids having consumers import libc for common signals, and it
improves discoverability since users need not be aware that libc
contains all supported constants.
2019-08-13 21:07:22 -07:00
Ivan Petkov and Carl Lerche
513326e01d
signal: remove driver task for Windows event implementation ( #1429 )
...
Windows guarantees handler routines are always invoked in a new thread
(https://docs.microsoft.com/en-us/windows/console/handlerroutine ), so we
don't need to use the handler-wake-another-driver technique used in the
Unix implementation
By broadcasting the event notifications from the handler, we no longer
need the Driver task to be spawned, which fixes the starvation issue if
the executor which runs the Driver task goes away
Also changed the behavior so that the default event handler runs if
all listeners for CTRL_{C, BREAK} events go away.
2019-08-13 21:01:06 -07:00
Ivan Petkov and Carl Lerche
73a91ad7b3
signal: delete blocking Read/Write impls on ChildStd{in, out, err} ( #1428 )
2019-08-13 20:53:02 -07:00
Taiki Endo and Carl Lerche
930cce8677
chore: update futures-preview to 0.3.0-alpha.18 ( #1427 )
2019-08-10 14:09:28 -07:00
Taiki Endo and GitHub
6a125082e4
chore: apply unreachable_pub and missing_debug_implementations to all crates ( #1424 )
2019-08-11 04:28:52 +09:00
Taiki Endo and GitHub
d9f9c5658f
chore: bump to newer nightly ( #1426 )
2019-08-11 02:01:20 +09:00
Taiki Endo and GitHub
fff39c03b1
ci: deny warnings in cirrus ( #1425 )
2019-08-11 01:41:51 +09:00
Tomasz Miąsko and Carl Lerche
756606a58b
uds: implement split and split_mut for UnixStream ( #1395 )
...
This mirrors split API available in TcpStream.
2019-08-09 12:50:18 -07:00
Ran Benita and Carl Lerche
e3b4c99a33
codec: a few suggestions ( #1418 )
...
How the buffer is managed is often critical for performance. Not
taking care of it will be catastrophic for performance beyond the
initial buffer size with the current implementation (a loop of
`reserve(1)`).
2019-08-09 12:20:31 -07:00
Taiki Endo and GitHub
42fa0c28d3
timer: use std::sync::atomic::AtomicU64 instead of own AtomicU64 ( #1421 )
2019-08-10 03:42:03 +09:00
Taiki Endo and Carl Lerche
f7b41c9dcc
macros: improve error messages ( #1420 )
2019-08-09 10:28:22 -07:00
Taiki Endo and GitHub
73102760cf
chore: change default lint level to warning and deny warnings in CI ( #1416 )
2019-08-10 00:07:57 +09:00
Douman and Lucio Franco
18833a8e67
macros: Error on function with arguments ( #1419 )
2019-08-09 11:04:41 -04:00
tmiasko and Carl Lerche
eba8bf2b4b
io: implement AsyncWrite for Vec<u8> ( #1409 )
2019-08-08 20:55:27 -07:00
David Kellum and Carl Lerche
790d649dc5
update (dev dep) env_logger to latest 0.6 ( #1390 )
2019-08-08 20:37:32 -07:00
Lucio Franco and Carl Lerche
50e5d401df
chore: prepare for v0.2.0-alpha.1 release ( #1410 )
tokio-0.2.0-alpha.1
2019-08-08 12:48:53 -07:00
Carl Lerche and GitHub
2e69f2a7fd
sync: track upstream loom changes ( #1407 )
2019-08-07 23:24:22 -07:00
Carl Lerche and GitHub
962521f449
chore: enable full CI run ( #1399 )
...
* update all tests
* fix doc examples
* misc API tweaks
2019-08-07 20:02:13 -07:00
Carl Lerche and GitHub
831be9c08e
executor: remove unused dependency ( #1406 )
2019-08-07 19:55:42 -07:00
Carl Lerche and GitHub
23c380a78f
sync: track loom changes ( #1405 )
2019-08-07 15:38:34 -07:00
Lucio Franco and Carl Lerche
0a05332648
Remove git dep and add macro examples ( #1404 )
...
Signed-off-by: Lucio Franco <[email protected] >
2019-08-07 15:02:38 -07:00
Lucio Franco and GitHub
7268b0bb3a
Migrate threadpool to futures-util ( #1403 )
...
* Migrate threadpool to futures-util
Signed-off-by: Lucio Franco <[email protected] >
* fmt
2019-08-07 16:26:44 -04:00
Lucio Franco and Carl Lerche
6412389bba
executor: update park implementation ( #1402 )
...
Signed-off-by: Lucio Franco <[email protected] >
2019-08-07 13:01:13 -07:00
tmiasko and Carl Lerche
53a94c025d
io: implement AsyncBufRead for &[u8] and Cursor ( #1397 )
...
* `impl AsyncRead for &[u8]`
* `impl AsyncBufRead for &[u8]`
* `impl<T: AsRef<[u8]> + Unpin> AsyncRead for Cursor<T>`
* `impl<T: AsRef<[u8]> + Unpin> AsyncBufRead for Cursor<T>`
2019-08-07 12:57:37 -07:00
Gurwinder Singh and Carl Lerche
7174c63bf9
codec: move length delimited codec to tokio-codec ( #1401 )
2019-08-07 12:10:05 -07:00
Ivan Petkov and Carl Lerche
cb2336ff3d
process: Misc polish ( #1400 )
...
* Denied all warnings in tests, and denied rust_2018_idioms violations
* Bumped the crate version and set publish = false
* Pruned dependencies:
- Only pull in tokio-sync on windows where it is used
- Removed unused dev-dependencies
* Switch to Async{Read, Write} traits from tokio-io rather than
futures-io
* Use #[tokio::test] where possible
* Removed deprecated items
* Fix all doc examples
2019-08-07 10:38:45 -07:00
Carl Lerche and GitHub
47e2ff48d9
tokio: fix API doc examples ( #1396 )
2019-08-06 14:03:49 -07:00
Carl Lerche and GitHub
2f43b0a023
sync: polish and update API doc examples ( #1398 )
...
- Remove `poll_*` fns from some of the sync types.
- Move `AtomicWaker` and `Lock` to the root of the `sync` crate.
2019-08-06 13:54:56 -07:00
Carl Lerche and GitHub
05d00aebb7
uds: remove poll_* fns in favor of async fns ( #1394 )
2019-08-05 15:05:02 -07:00
Carl Lerche and GitHub
62733a6594
udp: remove poll_* fns in favor of async fns ( #1393 )
...
This removes the need for manual futures.
2019-08-05 14:18:18 -07:00
Carl Lerche and GitHub
6d8cc4e475
tcp: update API documentation ( #1392 )
2019-08-05 11:50:55 -07:00
Carl Lerche and GitHub
6cbe3d4f82
fs: use async fn instead of custom futures ( #1381 )
...
Also update all the doc examples.
2019-08-04 11:24:30 -07:00
Carl Lerche and GitHub
337646b97f
tokio: re-export future/stream utils ( #1387 )
2019-08-03 21:08:29 -07:00
Taiki Endo and Carl Lerche
0bb015588a
codec: add AsyncBufRead/BufRead implementations ( #1385 )
...
* AsyncBufRead for FramedWrite2<T>
* BufRead for FramedWrite2<T>
* AsyncBufRead for Fuse<T, U>
* BufRead for Fuse<T, U>
2019-08-03 20:15:50 -07:00
Steven Fackler and Lucio Franco
63377e2110
Add AsyncWriteExt::shutdown ( #1382 )
2019-08-03 00:51:24 -04:00
Carl Lerche and GitHub
878503f965
docs: update API documentation for some crates ( #1380 )
...
Updates API documentation for
- tokio-buf
- tokio-codec
- tokio-current-thread
- tokio-executor
2019-08-02 14:35:32 -07:00
Carl Lerche and GitHub
2c01b3e0e0
io: remove util from default features ( #1379 )
...
Sub-crates should require opting into features.
2019-08-02 12:59:24 -07:00
Carl Lerche and GitHub
ee9105d166
tokio: add async io traits to prelude ( #1378 )
2019-08-02 12:50:40 -07:00
Lucio Franco and Carl Lerche
5a4f849bba
tokio: update tinyhttp example to async/await ( #1372 )
2019-08-02 12:24:15 -07:00
Lucio Franco and Carl Lerche
ff41108834
io: move io helpers back into tokio-io ( #1377 )
...
Utilities are made optional with a feature flag.
2019-08-02 12:23:44 -07:00