From 2cb8b9f33877d5158a9cb9f952d35487417929d0 Mon Sep 17 00:00:00 2001 From: Martin Geisler Date: Sun, 24 Mar 2024 20:57:06 +0000 Subject: [PATCH] Test solution to async Dining Philosophers --- Cargo.lock | 7 +++++++ Cargo.toml | 1 + src/concurrency/async-exercises/Cargo.toml | 12 ++++++++++++ 3 files changed, 20 insertions(+) create mode 100644 src/concurrency/async-exercises/Cargo.toml diff --git a/Cargo.lock b/Cargo.lock index 3154677f..10f2cb18 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -158,6 +158,13 @@ dependencies = [ "tokio", ] +[[package]] +name = "async-exercises" +version = "0.1.0" +dependencies = [ + "tokio", +] + [[package]] name = "async-pitfalls" version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml index b33c0d92..ad98fead 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,6 +10,7 @@ members = [ "src/control-flow-basics", "src/error-handling", "src/concurrency/sync-exercises", + "src/concurrency/async-exercises", "src/concurrency/async-exercises/chat-async", "src/generics", "src/iterators", diff --git a/src/concurrency/async-exercises/Cargo.toml b/src/concurrency/async-exercises/Cargo.toml new file mode 100644 index 00000000..8bd284a3 --- /dev/null +++ b/src/concurrency/async-exercises/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "async-exercises" +version = "0.1.0" +edition = "2021" +publish = false + +[[bin]] +name = "dining-philosophers-async" +path = "dining-philosophers.rs" + +[dependencies] +tokio = { version = "1.36.0", features = ["full"] }