Crates.io | cancel-rw |
lib.rs | cancel-rw |
version | |
source | src |
created_at | 2024-12-01 15:42:48.686108 |
updated_at | 2024-12-01 15:42:48.686108 |
description | Newtypes that allow cancellation of synchronous reads and writes |
homepage | |
repository | https://github.com/rodrigorc/cancel-rw |
max_upload_size | |
id | 1467598 |
Cargo.toml error: | TOML parse error at line 17, column 1 | 17 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
Crate that provides a newtype that makes any synchronous Read
, Write
or Seek
into a cancellable.
Its use case is to be able to cancel synchronous operation that are usually short lived,
and not async
. Sometimes these sync operations may take quite some time, and the program
needs to be able to cancel it. If it were async
that would be trivial, but being all sync
reads and writes, it must be run to completions.
Sometimes with io
, you can just close the underlying socket or file and hope for a quick
error. But in the general case that is not so easy.