Commit Graph

154 Commits

Author SHA1 Message Date
John Nunley 1a20703b97
v1.6.0
Signed-off-by: John Nunley <dev@notgull.net>
2024-04-27 16:04:10 -07:00
James Liu 393659524e
Make tracing optional (#60) 2024-04-21 17:04:01 -07:00
James Liu f6fea36562
Remove fastrand dependency (#61) 2024-04-21 16:40:34 -07:00
John Nunley 02cd156338
feat: Propogate panics that occur in unblocked functions
This commit makes it so if a panic occurs in an unblock task, that panic
is propogated to the caller. Previously, the task would just fail to
complete and would produce a less intuitive error.

Tests are also added to make sure the panic is propogated.

Signed-off-by: John Nunley <dev@notgull.net>
2024-04-20 12:11:46 -07:00
Taiki Endo 22eaea7505 Fix redundant import warning
```
error: the item `AsyncRead` is imported redundantly
   --> src/lib.rs:105:18
    |
105 | use futures_io::{AsyncRead, AsyncSeek, AsyncWrite};
    |                  ^^^^^^^^^
106 | use futures_lite::{future, prelude::*, ready};
    |                            ---------- the item `AsyncRead` is already imported here
    |
    = note: `-D unused-imports` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(unused_imports)]`

error: the item `AsyncSeek` is imported redundantly
   --> src/lib.rs:105:29
    |
105 | use futures_io::{AsyncRead, AsyncSeek, AsyncWrite};
    |                             ^^^^^^^^^
106 | use futures_lite::{future, prelude::*, ready};
    |                            ---------- the item `AsyncSeek` is already imported here

error: the item `AsyncWrite` is imported redundantly
   --> src/lib.rs:105:40
    |
105 | use futures_io::{AsyncRead, AsyncSeek, AsyncWrite};
    |                                        ^^^^^^^^^^
106 | use futures_lite::{future, prelude::*, ready};
    |                            ---------- the item `AsyncWrite` is already imported here
```
2024-03-03 06:47:18 -08:00
Taiki Endo aa47ae0e35 Migrate to Rust 2021 2024-01-07 06:54:59 +09:00
Taiki Endo 1680dc24d3 Relax MSRV to 1.60
https://github.com/smol-rs/futures-lite/pull/90
2024-01-07 06:54:59 +09:00
Taiki Endo b06e335885 ci: Use cargo-hack's --rust-version flag for msrv check
This respects rust-version field in Cargo.toml, so it removes the need
to manage MSRV in both the CI file and Cargo.toml.
2024-01-07 06:54:59 +09:00
John Nunley 73d76a9907
v1.5.1
Signed-off-by: John Nunley <dev@notgull.net>
2023-11-12 16:38:04 -08:00
John Nunley 96764936db
bugfix: Fix compilation on wasm32
Signed-off-by: John Nunley <dev@notgull.net>
2023-11-12 16:22:36 -08:00
John Nunley 81ec3dd822
v1.5.0
Signed-off-by: John Nunley <dev@notgull.net>
2023-11-05 17:26:02 -08:00
John Nunley 78060d4e60 MSRV bump
Signed-off-by: John Nunley <dev@notgull.net>
2023-11-04 09:14:11 -07:00
John Nunley d5189ef606 Bump async-channel, async-lock and futures-lite
Signed-off-by: John Nunley <dev@notgull.net>
2023-11-04 09:14:11 -07:00
dependabot[bot] 55ff46a857 Update async-lock requirement from 2.6.0 to 3.0.0
Updates the requirements on [async-lock](https://github.com/smol-rs/async-lock) to permit the latest version.
- [Release notes](https://github.com/smol-rs/async-lock/releases)
- [Changelog](https://github.com/smol-rs/async-lock/blob/master/CHANGELOG.md)
- [Commits](https://github.com/smol-rs/async-lock/compare/v2.6.0...v3.0.0)

---
updated-dependencies:
- dependency-name: async-lock
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-31 03:33:16 +09:00
John Nunley 37801979ce
v1.4.1
Signed-off-by: John Nunley <dev@notgull.net>
2023-10-07 21:16:37 -07:00
Leonz 23a26e98b2
m: change Executor grow_pool fn error span to tracing span 2023-10-05 17:44:28 -07:00
John Nunley c3b5e01b3c
v1.4.0
Signed-off-by: John Nunley <dev@notgull.net>
2023-09-25 10:40:21 -07:00
John Nunley 2f6c08f013
m: Bump MSRV to 1.59
Since concurrent-queue has bumped its MSRV, we must follow.

Signed-off-by: John Nunley <dev@notgull.net>
2023-09-25 10:34:28 -07:00
Taiki Endo 6b7eb25ac8 Update actions/checkout action to v4 2023-09-10 18:23:43 +09:00
John Nunley f89581310d
Add smol-rs logo (#41) 2023-07-17 14:32:48 +09:00
dependabot[bot] 121e1cfbda Update fastrand requirement from 1.3.4 to 2.0.0
Updates the requirements on [fastrand](https://github.com/smol-rs/fastrand) to permit the latest version.
- [Release notes](https://github.com/smol-rs/fastrand/releases)
- [Changelog](https://github.com/smol-rs/fastrand/blob/master/CHANGELOG.md)
- [Commits](https://github.com/smol-rs/fastrand/compare/v1.3.4...v2.0.0)

---
updated-dependencies:
- dependency-name: fastrand
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-14 13:29:31 +09:00
John Nunley 1e835fb4ae
feat: Setup tracing instrumentation
Replace the `log` crate with `tracing`. See this comment for more information:
https://github.com/smol-rs/blocking/pull/31#discussion_r1059248293
2023-06-13 21:25:36 -07:00
Taiki Endo 1874de8c35 Update permissions for security_audit 2023-06-09 00:15:53 +09:00
John Nunley 75cb224b1f
Use piper for read/write pipes (#37) 2023-05-07 17:44:46 +02:00
John Nunley 610f8b161c
Remove memchr dependency (#38) 2023-04-30 12:35:09 -07:00
John Nunley 12e4b30612
v1.3.1 (#36) 2023-04-07 10:35:26 -07:00
Taiki Endo b76ff16ec9 Bump MSRV to 1.48
async-lock 2.7.0 requires Rust 1.48.

```
error[E0658]: use of unstable library feature 'future_readiness_fns'
   --> /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/async-lock-2.7.0/src/once_cell.rs:430:45
    |
430 |             self.initialize_or_wait(move || std::future::ready(closure()), &mut Blocking),
    |                                             ^^^^^^^^^^^^^^^^^^
    |
```
2023-03-06 01:11:50 +09:00
Taiki Endo 4743fb807c Minimize GITHUB_TOKEN permissions
Refs: https://github.blog/changelog/2021-04-20-github-actions-control-permissions-for-github_token
2023-01-21 20:34:10 +09:00
Taiki Endo f2aff91569 Set CARGO_NET_GIT_FETCH_WITH_CLI=true in CI 2023-01-21 20:07:37 +09:00
John Nunley dbdef7e55b
Gracefully handle the inability to spawn threads, take 2 (#31)
* Gracefully handle the inability to spawn threads

* Ensure the thread limit is never zero
2022-12-30 10:14:18 -08:00
Taiki Endo 59b51b6e35 Enable dependabot update for Rust 2022-12-28 12:23:35 +09:00
Taiki Endo d30d1b07ad Clean up CI config 2022-12-28 12:23:35 +09:00
Taiki Endo 35c91abea0 Release 1.3.0 2022-11-26 17:27:12 +09:00
Taiki Endo ef8f04f6bb Remove msrv field from .clippy.toml
Since Rust 1.64, Clippy respects `rust-version` field in Cargo.toml.
rust-lang/rust@b776fb8
2022-11-26 17:27:12 +09:00
John Nunley 6e779c1960
Replace once_cell with async-lock (#30) 2022-10-29 21:41:12 -07:00
Taiki Endo 8d8e25831b Enable -Zmiri-strict-provenance 2022-08-16 22:54:51 +09:00
Taiki Endo 9f8fec9e6e Ignore clippy::needless_range_loop lint in test
```
warning: the loop variable `i` is used to index `v1`
  --> tests/unblock.rs:52:18
   |
52 |         for i in 0..v1.len() {
   |                  ^^^^^^^^^^^
   |
   = note: `#[warn(clippy::needless_range_loop)]` on by default
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
help: consider using an iterator
   |
52 |         for (i, <item>) in v1.iter_mut().enumerate() {
   |             ~~~~~~~~~~~    ~~~~~~~~~~~~~~~~~~~~~~~~~

warning: the loop variable `i` is used to index `v1`
  --> tests/unblock.rs:71:18
   |
71 |         for i in 0..v1.len() {
   |                  ^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
help: consider using an iterator
   |
71 |         for (i, <item>) in v1.iter_mut().enumerate() {
   |             ~~~~~~~~~~~    ~~~~~~~~~~~~~~~~~~~~~~~~~

warning: the loop variable `i` is used to index `v`
  --> tests/unblock.rs:89:18
   |
89 |         for i in 0..len {
   |                  ^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
help: consider using an iterator
   |
89 |         for (i, <item>) in v.iter_mut().enumerate().take(len) {
   |             ~~~~~~~~~~~    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
2022-07-17 21:39:09 +09:00
Taiki Endo c1b8fae3cc Fix clippy::or_fun_call warning in example
```
warning: use of `unwrap_or` followed by a function call
  --> examples/ls.rs:15:35
   |
15 |     let path = env::args().nth(1).unwrap_or(".".into());
   |                                   ^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| ".".into())`
   |
   = note: `#[warn(clippy::or_fun_call)]` on by default
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call
```
2022-07-17 21:37:47 +09:00
Taiki Endo b6e8f8e875 Apply clippy to all targets 2022-07-17 21:21:33 +09:00
Taiki Endo c7d9f5b632 Bump MSRV to Rust 1.47
https://github.com/smol-rs/async-task/releases/tag/v4.3.0
2022-07-08 01:22:25 +09:00
Taiki Endo 6c82a6e747
Merge pull request #26 from smol-rs/miri
Run Miri on CI
2022-07-03 00:25:09 +09:00
Taiki Endo 6a2ee40336 Run Miri on CI 2022-07-03 00:18:22 +09:00
Taiki Endo 10ff11b94f Update CI config 2022-07-03 00:01:51 +09:00
Taiki Endo 2f530a4696 Fix clippy::borrow_deref_ref warning
```
warning: deref on an immutable reference
   --> src/lib.rs:590:30
    |
590 |                 let io: &T = &*io;
    |                              ^^^^
    |
    = note: `#[warn(clippy::borrow_deref_ref)]` on by default
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref
help: if you would like to reborrow, try removing `&*`
    |
590 |                 let io: &T = io;
    |                              ~~
help: if you would like to deref, try using `&**`
    |
590 |                 let io: &T = &**io;
    |                              ~~~~~
```
2022-07-02 23:45:10 +09:00
Taiki Endo d8dc26d0a4 Update actions/checkout action to v3 2022-05-01 14:06:30 +09:00
Taiki Endo df796bd4f5 Release 1.2.0 2022-03-13 00:19:30 +09:00
Taiki Endo 8dae6af497 Use #[doc(no_inline)] on re-exports 2022-03-13 00:17:41 +09:00
Taiki Endo 4a775ebcb0
Merge pull request #25 from Neo-Zhixing/unblock_task
unblock returns Task
2022-03-13 00:10:58 +09:00
Zhixing Zhang 501cfc2d48
cargo fmt 2022-03-06 00:06:26 -08:00
Zhixing Zhang 176c6605d9
unblock returns Task 2022-03-05 16:49:25 -08:00