|
|
@@ -4,6 +4,7 @@ use std::collections::BTreeMap;
|
|
|
use std::io::Error;
|
|
|
use std::str::FromStr;
|
|
|
use std::sync::Arc;
|
|
|
+use std::time::Duration;
|
|
|
use tokio::sync::{mpsc, Mutex};
|
|
|
use tokio::try_join;
|
|
|
use tracing::{error, info};
|
|
|
@@ -55,6 +56,8 @@ async fn main() {
|
|
|
let order_handler_quant_arc = quant_arc.clone();
|
|
|
let order_handler_thread = tokio::spawn(async move {
|
|
|
loop {
|
|
|
+ tokio::time::sleep(Duration::from_millis(1)).await;
|
|
|
+
|
|
|
match order_receiver.recv().await {
|
|
|
Some(order) => {
|
|
|
{
|
|
|
@@ -88,6 +91,8 @@ async fn main() {
|
|
|
// let error_handler_quant_arc = quant_arc.clone();
|
|
|
let error_handler_thread = tokio::spawn(async move {
|
|
|
loop {
|
|
|
+ tokio::time::sleep(Duration::from_millis(1)).await;
|
|
|
+
|
|
|
match error_receiver.recv().await {
|
|
|
Some(error) => {
|
|
|
// let quant = error_handler_quant_arc.lock().await;
|