Skip to content

Commit

Permalink
Update.
Browse files Browse the repository at this point in the history
  • Loading branch information
ar37-rs committed Sep 28, 2022
1 parent 286fb4f commit 15d0be0
Show file tree
Hide file tree
Showing 8 changed files with 92 additions and 97 deletions.
9 changes: 4 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
# Changelog
## [4.6.3] - 2022-9-28
- Make Flower uncloneable to avoid any kind of data races, added FlowerState as alternative.
## [4.8.0] - 2022-9-28
- Make Flower and Handle uncloneable to avoid any kind of deadlock and data races, added FlowerState as alternative.
- Internal only: Replace `Option<S, R>` with `TypeOpt<S, R>` managing value of the sync (mtx) state.
- Revert: don't use trait bound `Clone` on type `<S, R>`
- Added functionality to set verboser error message using `fn error_verbose`.

## [4.6.0] - 2022-9-26
- Remove deprecated fn
- Added 'set_result` and `try_result` fn for more simpler error handling.
- Added `IOError` type alias
- Update examples
- Imrove doc
- Doc and performance improved.

## [4.0.2] - 2022-9-26
- Fix unexpected deadlock on `result` fn.
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "flowync"
version = "4.6.3"
version = "4.8.0"
authors = ["Ar37-rs <[email protected]>"]
edition = "2021"
description = "A simple utility for multithreading a/synchronization"
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ fn main() {
// notify_loading_fn();

flower
.extract(|channel| {
// Poll channel
.poll(|channel| {
if let Some(value) = channel {
println!("{}", value);
}
Expand Down
3 changes: 1 addition & 2 deletions examples/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ fn main() {
// notify_loading_fn();

flower
.extract(|channel| {
// Poll channel
.poll(|channel| {
if let Some(value) = channel {
println!("{}", value);
}
Expand Down
7 changes: 1 addition & 6 deletions examples/tokio_full.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,7 @@ async fn main() {
loop {
if flower.is_active() {
flower
.extract(|channel| {
// Poll channel
if let Some(value) = channel {
println!("{}", value);
}
})
.extract(|value| println!("{}", value))
.finalize(|result| {
match result {
Ok(elapsed) => println!(
Expand Down
7 changes: 1 addition & 6 deletions examples/vectored_tasks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,7 @@ fn main() {

let mut done = false;
flower
.extract(|channel| {
// Poll channel
if let Some(value) = channel {
println!("{}", value);
}
})
.extract(|value| println!("{}", value))
.finalize(|result| {
match result {
Ok(elapsed) => println!(
Expand Down
Loading

0 comments on commit 15d0be0

Please sign in to comment.