pass task function immutable thread_client pointer
@@ -47,7 +47,7 @@ pub async fn client_main(
thread_client.task_request_name = Some(thread_task_name.to_string());
}
// Invoke the task function.
- function(&mut thread_client).await;
+ function(&thread_client).await;
}
}
}
@@ -92,7 +92,7 @@ pub async fn client_main(
thread_client.task_request_name = Some(thread_task_name.to_string());
}
// Invoke the task function.
- function(&mut thread_client).await;
+ function(&thread_client).await;
// Prepare to sleep for a random value from min_wait to max_wait.
let wait_time = if thread_client.max_wait > 0 {
@@ -159,7 +159,7 @@ pub async fn client_main(
thread_client.task_request_name = Some(thread_task_name.to_string());
}
// Invoke the task function.
- function(&mut thread_client).await;
+ function(&thread_client).await;
}
}
}
