Skip to content

Commit

Permalink
MySQL own mutex , why Mysql is so gae ?
Browse files Browse the repository at this point in the history
  • Loading branch information
pxp9 committed Sep 2, 2023
1 parent 16e94ef commit eaa7bc0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion fang/src/asynk/async_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ static ASYNC_QUEUE_POSTGRES_TEST_COUNTER: Mutex<u32> = Mutex::const_new(0);
#[cfg(test)]
static ASYNC_QUEUE_SQLITE_TEST_COUNTER: Mutex<u32> = Mutex::const_new(0);

#[cfg(test)]
static ASYNC_QUEUE_MYSQL_TEST_COUNTER: Mutex<u32> = Mutex::const_new(0);

#[cfg(test)]
use sqlx::Executor;

Expand Down Expand Up @@ -260,7 +263,7 @@ impl AsyncQueue {
.uri(format!("{}/{}", base_url, base_db))
.build();

let mut new_number = ASYNC_QUEUE_POSTGRES_TEST_COUNTER.lock().await;
let mut new_number = ASYNC_QUEUE_MYSQL_TEST_COUNTER.lock().await;
res.connect().await.unwrap();

let db_name = format!("async_queue_test_{}", *new_number);
Expand Down

0 comments on commit eaa7bc0

Please sign in to comment.