Mikail Bagishov
d35ff7064f
sync: add drop guard for cancellation token ( #3839 )
2021-06-28 12:34:58 +02:00
Taiki Endo
9d8b37d51a
macros: suppress clippy::default_numeric_fallback lint in generated code ( #3831 )
2021-06-02 18:16:23 +09:00
Aaron Taner
ce9ca45c92
doc: fix invalid #[doc(inline)]
warnings on latest nightly. ( #3788 )
...
This commit fixed issue #3787 by removing [doc(inline)] from
macro `cfg_macros` and added proper #[doc(inline)] attributes
to `pub use` items inside `cfg_macros` calls.
It's probably not `cfg_macros`s responsibility to inlining public
macros, though it's conveninent to do so. Notice that in lib.rs:
cfg_macros! {
/// Implementation detail of the `select!` macro. This macro is **not**
/// intended to be used as part of the public API and is permitted to
/// change.
#[doc(hidden)]
pub use tokio_macros::select_priv_declare_output_enum;
...
}
`#[doc(hidden)]` and `#[doc(inline)]` are conflict with each other
in the sense of correctness.
Fixes : #3787
2021-05-18 01:28:17 +09:00
Alice Ryhl
deb1f98125
chore: prepare tokio-util v0.6.7 ( #3784 )
2021-05-14 18:22:08 +02:00
Chris Moore
05c3cf3a0a
util: impl AsRawFd/AsRawHandle for Compat<T> ( #3765 )
2021-05-08 12:55:04 +02:00
John-John Tedro
2c5dc83019
cargo: path dependencies for all tokio things ( #3764 )
2021-05-08 12:54:30 +02:00
Taiki Endo
c4b6b130f3
chore: bump nightly to nightly-2021-04-25 ( #3754 )
2021-05-05 17:39:17 +02:00
Kai Mast
55c5d12451
util: require full feature in tokio-util tests ( #3636 )
2021-05-05 18:21:25 +09:00
Evan Cameron
9eeec039f2
util: make UdpFramed take Borrow<UdpSocket> ( #3451 )
2021-04-14 20:16:23 +02:00
Alice Ryhl
917aad684b
chore: prepare tokio-util 0.6.6 ( #3696 )
2021-04-12 21:23:20 +02:00
Eliza Weisman
bf8c77bea1
util: add PollSemaphore::{add_permits, available_permits}
( #3683 )
...
## Motivation
The `tokio::sync::Semaphore` type provides a
[`Semaphore::available_permits` method][1] which returns the current
number of permits available on the semaphore.
`tokio_util::sync::PollSemaphore` [does not expose such a method][2]. It
is possible to use `PollSemaphore::into_inner` or
`PollSemaphore::clone_inner` to unwrap the inner semaphore, but this may
require cloning/dropping the semaphore's `Arc` which shouldn't be
necessary to access the permits.
## Solution
This commit adds `PollSemaphore::available_permits`. It also adds
`PollSemaphore::add_permits` and an `AsRef<Semaphore>` impl while
we're here.
[1]: https://docs.rs/tokio/1.4.0/tokio/sync/struct.Semaphore.html#method.available_permits
[2]: https://docs.rs/tokio-util/0.6.5/tokio_util/sync/struct.PollSemaphore.html#implementations
Closes #3682
2021-04-07 11:40:03 -07:00
Nylonicious
8fc49dc522
chore: update years in all licenses ( #3665 )
2021-03-30 21:45:13 +02:00
Moritz Gunz
227b3e0d9c
chore: avoid allocation if PollSemaphore is unused ( #3634 )
2021-03-22 17:02:30 +01:00
somethingelseentirely
8ed825fd49
util: makes Framed and FramedStream resumable after eof ( #3272 )
2021-03-22 09:09:01 +01:00
David Pedersen
81f47e8866
util: fix indentation and typos in DelayQueue
docs ( #3626 )
2021-03-20 14:31:12 +01:00
David Pedersen
b1310ad14d
chore: prepare tokio-util v0.6.5 ( #3622 )
2021-03-20 12:16:56 +01:00
Zahari Dichev
edfff7551a
util: anotate time module as requiring time feature ( #3606 )
...
Signed-off-by: Zahari Dichev <zaharidichev@gmail.com>
2021-03-11 16:02:01 +01:00
cssivision
bcb95db4e2
chore: fix clippy warnings in newer versions ( #3588 )
2021-03-10 08:42:24 +01:00
Alice Ryhl
b08b5edb2c
chore: prepare tokio-util v0.6.4 ( #3599 )
2021-03-09 22:11:38 +01:00
Alice Ryhl
db1d90453c
util: fuse PollSemaphore ( #3578 )
2021-03-09 19:22:36 +01:00
Alice Ryhl
0867a6fc03
util: add pollable mpsc::Sender ( #3490 )
2021-03-04 17:29:30 +01:00
r-zig
5756a005a6
codec: LinesCodec should only return MaxLineLengthExceeded once per line ( #3556 )
2021-02-25 23:21:59 +01:00
r-zig
c9d2a36c7b
codec: AnyDelimiter codec ( #3406 )
2021-02-23 16:56:11 +01:00
Taiki Endo
36d7dab504
chore: remove html_root_url ( #3489 )
...
Co-authored-by: Alice Ryhl <alice@ryhl.io>
2021-02-18 14:11:39 -08:00
Alice Ryhl
60d88840f4
chore: prepare tokio-util v0.6.3 ( #3488 )
2021-01-31 12:39:22 +01:00
Alice Ryhl
ee1f0c473f
util: remove tokio-stream dependency from tokio-util ( #3487 )
2021-01-31 11:08:40 +01:00
Rob Ede
06d6adf4b7
util: use ReusableBoxFuture for PollSemaphore ( #3463 )
2021-01-30 10:57:04 +01:00
Alice Ryhl
891aba5f71
util: add ReusableBoxFuture utility ( #3464 )
2021-01-30 00:03:01 +01:00
Alice Ryhl
198363f4f1
chore: prepare tokio-util 0.6.2 ( #3453 )
2021-01-21 11:46:50 +01:00
William Bain
c4f66ed121
util: fix panics on updating DelayQueue entries ( #3270 )
2021-01-21 10:56:44 +01:00
Alice Ryhl
27b2d681e6
util: add pollable Semaphore ( #3444 )
2021-01-20 09:53:31 +01:00
Taiki Endo
d37486dd06
util: remove path deps ( #3413 )
...
* util: remove path deps
* ci: run clippy with --all-features
* ci: run tests with --all-features on FreeBSD CI
2021-01-13 00:19:57 +09:00
Daiki Mizukami
ed667c669a
chore: prepare tokio-util v0.6.1 release ( #3402 )
2021-01-12 12:46:07 +01:00
David Raifaizen
2fe2f0401b
util: expose FramedWrite/Framed::write_buffer/write_buffer_mut
2021-01-08 23:20:07 +01:00
Rust大闸蟹
e42317b072
chore: remove macro_rules semicolon ( #3381 )
...
fix build warning
2021-01-06 15:46:37 +09:00
Daiki Mizukami
36918e05e5
util: add more get_{ref,mut,pin_mut} methods ( #3364 )
...
This commit adds:
- Framed::get_pin_mut
- FramedRead::get_pin_mut
- FramedWrite::get_pin_mut
- StreamReader::get_ref
- StreamReader::get_mut
- StreamReader::get_pin_mut
- StreamReader::into_inner
2021-01-01 13:05:15 +01:00
Carl Lerche
a66017f049
chore: prepare Tokio 1.0 release ( #3319 )
2020-12-23 09:26:14 -08:00
Paolo Barbolini
aa6597ba66
compat: update traits naming to match tokio 1.0 ( #3324 )
2020-12-23 09:15:56 -08:00
Taiki Endo
ce0e9c67cf
chore: Revert "use #[non_exhaustive] instead of private unit field" ( #3323 )
...
This reverts commit 575938d4579e6fe6a89b700aadb0ae2bbab5483b.
2020-12-23 08:27:58 -08:00
Taiki Endo
575938d457
chore: use #[non_exhaustive] instead of private unit field ( #3320 )
2020-12-23 22:48:33 +09:00
Luke Steensen
a8dda19da4
chore: update to released bytes
1.0 ( #3317 )
2020-12-22 17:09:26 -08:00
Carl Lerche
2893359988
chore: update to bytes
1.0 git branch ( #3301 )
...
Updates the code base to track the `bytes` git branch. This is in
preparation for the 1.0 release.
Closes #3058
2020-12-19 15:57:16 -08:00
Carl Lerche
5e5f513542
chore: remove some left over stream
feature code ( #3300 )
...
Removes the `stream` feature flag from `Cargo.toml` and removes the
`futures-core` dependency. Once `Stream` lands in `std`, a feature flag
is most likely not needed.
2020-12-19 14:15:00 -08:00
Alice Ryhl
78f2340d25
tokio: remove prelude ( #3299 )
...
Closes : #3257
2020-12-19 11:42:24 -08:00
Alice Ryhl
3ecaf9fd9a
codec: write documentation for codec ( #3283 )
...
Co-authored-by: Lucio Franco <luciofranco14@gmail.com>
2020-12-18 21:32:27 +01:00
Carl Lerche
d74d17307d
time: remove Box
from Sleep
( #3278 )
...
Removes the box from `Sleep`, taking advantage of intrusive wakers. The
`Sleep` future is now `!Unpin`.
Closes #3267
2020-12-16 21:51:34 -08:00
Lucio Franco
8efa62013b
Move stream items into tokio-stream
( #3277 )
...
This change removes all references to `Stream` from
within the `tokio` crate and moves them into a new
`tokio-stream` crate. Most types have had their
`impl Stream` removed as well in-favor of their
inherent methods.
Closes #2870
2020-12-15 20:24:38 -08:00
Joshua Nelson
48961fac89
Document SinkExt
and other futures traits on docs.rs ( #3271 )
...
These are extremely hard to find if you don't already know they exist.
2020-12-14 10:28:36 -05:00
Alice Ryhl
c1ec469ad2
util: add constructors to TokioContext ( #3221 )
2020-12-11 20:41:22 -08:00
Nylonicious
16c2e0983c
net: Pass SocketAddr by value ( #3125 )
2020-12-10 14:58:27 -05:00