Commit Graph

89 Commits

Author SHA1 Message Date
John Nunley 2cfb6e4ed0
v1.5.4
Signed-off-by: John Nunley <dev@notgull.net>
2023-09-27 21:17:03 -07:00
John Nunley 4154ad2190
Fix a bug where TLS would become None (#55)
* Fix a bug where TLS would become None

The bug is invoked as follows:

- Runner 1 is created and stores the current version of the TLS
  LOCAL_QUEUE variable, which is None.
- Runner 2 is also created. It stores the current version of the TLS
  variable as well, which is Runner 1's queue.
- Runner 1 is dropped. It stores None into the LOCAL_QUEUE variable.
- Runner 2 tries to run. It reads from the LOCAL_QUEUE variable, sees
  that it is None, and panics.

This could be solved by just not using the local queue if the variable
is None. However, we can do one better; if the slot is open, we can
optimize the runner by replacing it with our own queue. This should
allow for the local queue to be used more often.

Closes #54

Signed-off-by: John Nunley <dev@notgull.net>
2023-09-27 20:01:15 -07:00
John Nunley 77b5b169c5
v1.5.3
Signed-off-by: John Nunley <dev@notgull.net>
2023-09-25 09:52:25 -07:00
John Nunley ecddfde87a
m: Remove unused memchr dependency
Signed-off-by: John Nunley <dev@notgull.net>
2023-09-23 11:01:56 -07:00
Taiki Endo ff67cb9a5f Update actions/checkout action to v4 2023-09-10 18:18:02 +09:00
Taiki Endo 609aafb330 Bump MSRV to 1.61
```
error: package `memchr v2.6.3` cannot be built because it requires rustc 1.61 or newer, while the currently active rustc version is 1.60.0
```
2023-09-05 00:49:20 +09:00
John Nunley a5ff8df7d9
bugfix: Ensure that ex.run() produces a Send future
This commit makes sure that the run() and tick() functions produce
futures that are Send and Sync, to prevent a regression introduced in
PR #37. Tests are also added to prevent this regression in the future.

Signed-off-by: John Nunley <dev@notgull.net>
2023-08-20 17:08:35 -07:00
John Nunley e19573367b
v1.5.2
Signed-off-by: John Nunley <dev@notgull.net>
2023-08-19 19:17:39 -07:00
John Nunley aed7279805
Add smol-rs logo (#46) 2023-07-17 14:35:07 +09:00
John Nunley 9df3dd4974
alg: Push tasks directly to the local runner
This commit adds an optimization where a thread-local variable contains the queue of the
current runner. Rather than pushing to the global queue and hoping that a local queue
eventually picks it up, tasks are pushed directly to this local queue if available.

This has led to speedups of up to 70% in some cases and up to 10% in other workloads.
2023-07-02 11:29:19 -07:00
John Nunley 1a9e08ce73
Use fastrand v2.0.0 (#45) 2023-06-09 17:53:03 -07:00
Yosh 85c20eb98b
Replace `num_cpus` crate with `std::thread` (#42) 2023-05-05 21:38:00 +09:00
Taiki Endo 8562c41062 Update permissions for security_audit 2023-04-10 02:35:44 +09:00
John Nunley a438e9da8c
v1.5.1 (#40) 2023-04-07 11:01:23 -07:00
John Nunley 6aba704efc
bench: Add benchmarks for lower thread counts (#38) 2023-03-10 19:18:48 -08:00
Taiki Endo b8885f9578 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:43:03 +09:00
Taiki Endo ddfb54d1c4 Minimize GITHUB_TOKEN permissions
Refs: https://github.blog/changelog/2021-04-20-github-actions-control-permissions-for-github_token
2023-03-04 11:41:08 +09:00
Taiki Endo 4d8e7bad23 Set CARGO_NET_GIT_FETCH_WITH_CLI=true in CI 2023-03-04 11:41:08 +09:00
John Nunley a988ee3e46
m: Migrate benchmarks to criterion (#35)
* m: Migrate to criterion

* Update CI
2023-01-23 11:30:43 -08:00
Taiki Endo f196463b09 Enable dependabot update for Rust 2022-12-28 12:27:06 +09:00
Taiki Endo b48a503109 Clean up CI config 2022-12-28 12:27:06 +09:00
John Nunley 8287e520b9
Implement debug output to be better (#33) 2022-12-25 07:12:59 -08:00
Taiki Endo 00ea6cf6a1 Release 1.5.0 2022-11-09 11:45:41 +09:00
Taiki Endo c09ecba5bb Update concurrent-queue to 2 2022-11-09 11:45:41 +09:00
Taiki Endo 92423cfaa1 Remove msrv field from .clippy.toml
Since Rust 1.64, Clippy respects `rust-version` field in Cargo.toml.
rust-lang/rust@b776fb8
2022-11-09 11:45:41 +09:00
John Nunley 263ea89390
Replace once_cell with async-lock (#29) 2022-10-29 21:41:55 -07:00
Taiki Endo d2daab599b Enable -Zmiri-strict-provenance 2022-08-16 22:54:23 +09:00
Taiki Endo 660747cd8d Apply clippy to tests and examples 2022-07-17 21:46:43 +09:00
Taiki Endo d1e4817bdc
Run Miri on CI (#27) 2022-07-08 01:21:16 +09:00
Taiki Endo 16f0b9ca70 Bump MSRV to Rust 1.47
https://github.com/smol-rs/async-task/releases/tag/v4.3.0
2022-07-08 01:14:13 +09:00
Taiki Endo 21f4982a3d Update CI config 2022-07-08 01:12:38 +09:00
Taiki Endo 19919c4694 Update actions/checkout action to v3 2022-05-01 13:35:15 +09:00
Taiki Endo f190408a6f Remove rustfmt.toml 2022-01-09 01:25:32 +09:00
Taiki Endo 367095cdc5 Create GitHub release automatically 2022-01-08 21:33:51 +09:00
Taiki Endo ee7bd4d2af Clean up CI config 2022-01-08 21:33:35 +09:00
Taiki Endo 2341801cd0 Fix clippy::redundant_closure warning 2021-12-30 09:38:02 +09:00
Taiki Endo b9ac443e56 Update slab to 0.4.4 2021-12-30 09:36:58 +09:00
Taiki Endo dacd4db652
Merge pull request #24 from smol-rs/next
Bump to v1.4.1
2021-04-24 18:10:06 +09:00
Taiki Endo edf0296f59 Bump to v1.4.1 2021-04-24 17:56:59 +09:00
Taiki Endo 50f867002c
Merge pull request #23 from smol-rs/slab
Replace vec-arena with slab
2021-04-20 11:29:13 +09:00
Taiki Endo f25cd267ac Replace vec-arena with slab 2021-04-18 22:39:34 +09:00
Taiki Endo 0ca774230e
Merge pull request #21 from smol-rs/readme
Remove readme field from Cargo.toml
2021-02-14 19:50:33 +09:00
Taiki Endo 4decd55ccb Remove readme field from Cargo.toml 2021-02-14 19:40:19 +09:00
Taiki Endo ab77214b6e
Merge pull request #20 from smol-rs/badge
Update license badge to match Cargo.toml
2021-02-14 13:48:11 +09:00
Taiki Endo d1ae069de4 Update license badge to match Cargo.toml 2021-02-14 13:39:05 +09:00
Taiki Endo af56c2a590
Merge pull request #19 from taiki-e/url
Update URLs
2020-12-26 23:54:58 +09:00
Taiki Endo 64b80cf591 Update URLs 2020-12-26 23:47:13 +09:00
Taiki Endo 9bbf0d8403
Merge pull request #18 from taiki-e/compare_and_swap
Replace deprecated compare_and_swap with compare_exchange
2020-12-24 21:34:50 +09:00
Taiki Endo c4d019827f Replace deprecated compare_and_swap with compare_exchange 2020-12-24 21:22:43 +09:00
Taiki Endo 337af8182a
Merge pull request #17 from taiki-e/ci
Fix CI
2020-12-24 19:11:54 +09:00