Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRega committed Oct 9, 2022
1 parent a1839ea commit da42451
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@
![CI](https://github.com/ChrisRega/lazy_async_promise/actions/workflows/rust.yml/badge.svg?branch=main "CI")

This crate currently only features two simple primitives for getting computation time off the main thread using tokio:
- LazyVecPromise for a vector-backed storage which can be partially displayed
- LazyValuePromise for a single value future
- `LazyVecPromise` for a vector-backed storage which can be displayed while the task in progress.
- `LazyValuePromise` for a single value future that can be updated during task-progress. My usage was for iterative algorithms where the intermediate results were interesting for display.

As the name suggests both of them are lazily evaluated and nothing happens until polled for the first time.
As the name suggests both of them are lazily evaluated and nothing happens until they are polled for the first time.

For single values which are either available or not there's `ImmediateValuePromise` which triggers computation immediately.
There's not in-calculation value read out, so either it's finished or not.

Example-usage of this crate with a small egui/eframe blog-reader can be found [here](https://github.com/ChrisRega/example-blog-client/)

0 comments on commit da42451

Please sign in to comment.