Skip to content

Commit

Permalink
Move from fast-async-mutex to async-lock crate as it's maintained.
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisstaite-menlo authored and allada committed Jun 25, 2023
1 parent 85bf34d commit e172756
Show file tree
Hide file tree
Showing 50 changed files with 264 additions and 181 deletions.
83 changes: 46 additions & 37 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ rusoto_core = "0.48.0"
rusoto_signature = "0.48.0"
http = "^0.2"
pin-project-lite = "0.2.7"
fast-async-mutex = "0.6.7"
async-lock = "2.7.0"
lz4_flex = "0.9.0"
bincode = "1.3.3"
bytes = "1.1.0"
Expand Down
2 changes: 1 addition & 1 deletion cas/grpc_service/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ rust_library(
"//cas/store:grpc_store",
"//config",
"//proto",
"//third_party:fast_async_mutex",
"//third_party:async_lock",
"//third_party:futures",
"//third_party:tokio",
"//third_party:tonic",
Expand Down
2 changes: 1 addition & 1 deletion cas/grpc_service/bytestream_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use std::pin::Pin;
use std::sync::Arc;
use std::time::Instant;

use fast_async_mutex::mutex::Mutex;
use async_lock::Mutex;
use futures::{stream::unfold, Stream};
use proto::google::bytestream::{
byte_stream_server::ByteStream, byte_stream_server::ByteStreamServer as Server, QueryWriteStatusRequest,
Expand Down
2 changes: 1 addition & 1 deletion cas/scheduler/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ rust_library(
srcs = ["scheduler.rs"],
deps = [
"//config",
"//third_party:fast_async_mutex",
"//third_party:async_lock",
"//third_party:lru",
"//third_party:rand",
"//third_party:tokio",
Expand Down
2 changes: 1 addition & 1 deletion cas/scheduler/scheduler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use std::collections::{BTreeMap, HashMap, HashSet};
use std::sync::Arc;
use std::time::SystemTime;

use fast_async_mutex::mutex::Mutex;
use async_lock::Mutex;
use lru::LruCache;
use rand::{thread_rng, Rng};
use tokio::sync::watch;
Expand Down
2 changes: 1 addition & 1 deletion cas/store/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ rust_library(
deps = [
"//config",
"//proto",
"//third_party:fast_async_mutex",
"//third_party:async_lock",
"//third_party:futures",
"//third_party:shellexpand",
"//third_party:tokio",
Expand Down
2 changes: 1 addition & 1 deletion cas/store/grpc_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
use std::pin::Pin;
use std::sync::Arc;

use async_lock::Mutex;
use async_trait::async_trait;
use fast_async_mutex::mutex::Mutex;
use futures::{stream::unfold, Stream};
use shellexpand;
use tonic::{transport, IntoRequest, Request, Response, Streaming};
Expand Down
6 changes: 3 additions & 3 deletions cas/worker/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ rust_library(
"//cas/store:filesystem_store",
"//proto",
"//third_party:bytes",
"//third_party:fast_async_mutex",
"//third_party:async_lock",
"//third_party:filetime",
"//third_party:futures",
"//third_party:hex",
Expand Down Expand Up @@ -98,7 +98,7 @@ rust_library(
testonly = True,
deps = [
"//proto",
"//third_party:fast_async_mutex",
"//third_party:async_lock",
"//third_party:tokio",
"//third_party:tonic",
":worker_api_client_wrapper",
Expand All @@ -113,7 +113,7 @@ rust_library(
deps = [
"//cas/scheduler:action_messages",
"//proto",
"//third_party:fast_async_mutex",
"//third_party:async_lock",
"//third_party:tokio",
"//util:error",
":running_actions_manager",
Expand Down
2 changes: 1 addition & 1 deletion cas/worker/running_actions_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ use std::process::Stdio;
use std::sync::{atomic::AtomicBool, atomic::Ordering, Arc, Weak};
use std::time::SystemTime;

use async_lock::Mutex;
use bytes::{BufMut, Bytes, BytesMut};
use fast_async_mutex::mutex::Mutex;
use filetime::{set_file_mtime, FileTime};
use futures::future::{try_join, try_join3, try_join_all, BoxFuture, FutureExt, TryFutureExt};
use futures::stream::{FuturesUnordered, StreamExt, TryStreamExt};
Expand Down
2 changes: 1 addition & 1 deletion cas/worker/tests/utils/mock_running_actions_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

use std::sync::Arc;

use async_lock::Mutex;
use async_trait::async_trait;
use fast_async_mutex::mutex::Mutex;
use tokio::sync::mpsc;

use action_messages::ActionResult;
Expand Down
2 changes: 1 addition & 1 deletion cas/worker/tests/utils/mock_worker_api_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

use std::sync::Arc;

use async_lock::Mutex;
use async_trait::async_trait;
use fast_async_mutex::mutex::Mutex;
use tokio::sync::mpsc;
use tonic::{Response, Status, Streaming};

Expand Down
Loading

0 comments on commit e172756

Please sign in to comment.