Skip to content

Commit

Permalink
remove prints in example
Browse files Browse the repository at this point in the history
  • Loading branch information
gterzian committed Jul 17, 2023
1 parent 57e18f1 commit 84189e2
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions examples/distributed_bakery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ async fn increment_output(doc_handle: &DocHandle, customer_id: &str) -> Result<u

// Wait for all peers to have acknowlegded the new output.
loop {
println!("Start increment_output loop");
doc_handle.changed().await.unwrap();

// Perform reads outside of closure,
Expand All @@ -84,7 +83,6 @@ async fn increment_output(doc_handle: &DocHandle, customer_id: &str) -> Result<u
},
);
if acked_by_all {
println!("End increment_output loop");
break;
}
}
Expand Down Expand Up @@ -117,7 +115,6 @@ async fn run_bakery_algorithm(doc_handle: &DocHandle, customer_id: &String) {
}

loop {
println!("Start run_bakery_algorithm loop");
doc_handle.changed().await.unwrap();

// Perform reads outside of closure,
Expand Down Expand Up @@ -161,7 +158,6 @@ async fn run_bakery_algorithm(doc_handle: &DocHandle, customer_id: &String) {

// Everyone else is at zero.
if has_lower.is_none() {
println!("End run_bakery_algorithm loop");
return;
}

Expand All @@ -170,15 +166,13 @@ async fn run_bakery_algorithm(doc_handle: &DocHandle, customer_id: &String) {
if lowest_number == our_number {
// Break tie by customer id.
if customer_id < id {
println!("End run_bakery_algorithm loop");
return;
} else {
continue;
}
}

if lowest_number > our_number {
println!("End run_bakery_algorithm loop");
return;
}
}
Expand All @@ -201,7 +195,6 @@ async fn acknowlegde_changes(doc_handle: DocHandle, customer_id: String) {
}

loop {
println!("Start acknowlegde_changes loop");
doc_handle.changed().await.unwrap();

// Perform reads outside of closure,
Expand Down

0 comments on commit 84189e2

Please sign in to comment.