GithubHelp home page GithubHelp logo

oxidecomputer / cancel-safe-futures Goto Github PK

View Code? Open in Web Editor NEW
54.0 54.0 2.0 5.67 MB

Alternative future adapters that provide cancel safety.

License: Apache License 2.0

Rust 95.45% Shell 4.08% Awk 0.47%

cancel-safe-futures's People

Contributors

renovate[bot] avatar sunshowers avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

ielm

cancel-safe-futures's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Pending Approval

These branches will be created by Renovate only once you click their checkbox below.

  • Update Rust crate anyhow to 1.0.86
  • Update Rust crate futures to 0.3.30
  • Update Rust crate futures-core to 0.3.30
  • Update Rust crate futures-sink to 0.3.30
  • Update Rust crate futures-util to 0.3.30
  • Update Rust crate pin-project-lite to 0.2.14
  • Update Rust crate tokio-test to 0.4.4
  • Update Rust crate bytes to 1.6.0
  • Update Rust crate tempfile to 3.10.1
  • ๐Ÿ” Create all pending approval PRs at once ๐Ÿ”

Awaiting Schedule

These updates are awaiting their schedule. Click on a checkbox to get an update now.

  • Pin dependencies

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

cargo
Cargo.toml
  • futures-core 0.3.28
  • futures-sink 0.3.28
  • futures-util 0.3.28
  • tokio 1.28.2
  • futures 0.3.28
  • pin-project-lite 0.2.9
  • anyhow 1.0.72
  • async-stream 0.3.5
  • bytes 1.4.0
  • debug-ignore 1.0.5
  • tempfile 3.6.0
  • tokio 1.28.2
  • tokio-test 0.4.0
github-actions
.github/workflows/ci.yml
  • actions/checkout v4@b4ffde65f46336ab88eb53be808477a3936bae11
  • dtolnay/rust-toolchain stable
  • Swatinem/rust-cache v2@a95ba195448af2da9b00fb742d14ffaaf3c21f43
  • actions/checkout v4@b4ffde65f46336ab88eb53be808477a3936bae11
  • dtolnay/rust-toolchain master
  • Swatinem/rust-cache v2@a95ba195448af2da9b00fb742d14ffaaf3c21f43
  • taiki-e/install-action cargo-hack
  • taiki-e/install-action nextest
  • actions/checkout v4@b4ffde65f46336ab88eb53be808477a3936bae11
  • dtolnay/rust-toolchain master
  • Swatinem/rust-cache v2@a95ba195448af2da9b00fb742d14ffaaf3c21f43
  • taiki-e/install-action nextest
  • actions/checkout v4@b4ffde65f46336ab88eb53be808477a3936bae11
  • dtolnay/rust-toolchain master
  • Swatinem/rust-cache v2@a95ba195448af2da9b00fb742d14ffaaf3c21f43
  • taiki-e/install-action cargo-hack
.github/workflows/coverage.yml
  • actions/checkout v4@b4ffde65f46336ab88eb53be808477a3936bae11
  • dtolnay/rust-toolchain nightly
  • Swatinem/rust-cache v2@a95ba195448af2da9b00fb742d14ffaaf3c21f43
  • taiki-e/install-action nextest
  • taiki-e/install-action cargo-llvm-cov
  • codecov/codecov-action v3@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d
.github/workflows/docs.yml
  • actions/checkout v4@b4ffde65f46336ab88eb53be808477a3936bae11
  • dtolnay/rust-toolchain stable
  • Swatinem/rust-cache v2@a95ba195448af2da9b00fb742d14ffaaf3c21f43
  • JamesIves/github-pages-deploy-action releases/v4
.github/workflows/release.yml
  • actions/checkout v4@b4ffde65f46336ab88eb53be808477a3936bae11
  • dtolnay/rust-toolchain stable
  • taiki-e/create-gh-release-action v1@8df4de6534ceacdaed10a08f73418ca751f31793

  • Check this box to trigger a request for Renovate to run again on this repository

Add negative result: `Uncancelable` wrapper that spawns a task

@hawkw and I were discussing a Uncancelable<F: FusedFuture> wrapper which runs a future, and spawns a task with the remaining work if the future is dropped before being completed. It is possible to write that, but it ran into several issues:

  • It's basically equivalent to eagerly spawning a task.
  • It requires the future to be Unpin, so it can be moved out of the Uncancelable future in order to spawn it as a task in the Drop impl. This implies that if the future is an async block, it would need to be eagerly boxed at construction time. So you aren't saving on allocations.
  • All the other typical limitations of spawning tasks apply, such that the future must be Send + 'static.

The one advantage is that it would avoid spawning a task if the wrapper is run to completion, but honestly the added complexity doesn't seem worth it.

We should document this in a "negative results" section in the cancel-safe-futures docs.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.