Skip to content

Commit

Permalink
Use mpsc instead crossbeam-channel (#826)
Browse files Browse the repository at this point in the history
  • Loading branch information
negezor authored Oct 10, 2024
1 parent c0042b7 commit 90ef5ca
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ categories = ["development-tools"]
async-trait = "0.1"
thiserror = "1.0"
anyhow = "1.0"
crossbeam-channel = "0.5"
derive_more = { workspace = true }
futures-util = { version = "0.3", default-features = false }
parking_lot = { version = "0.12", features = ["send_guard"] }
Expand Down
6 changes: 3 additions & 3 deletions sdk/src/workflow_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ use crate::{
IntoUpdateValidatorFunc, RustWfCmd, SignalExternalWfResult, TimerResult, UnblockEvent,
Unblockable, UpdateFunctions,
};
use crossbeam_channel::{Receiver, Sender};
use futures_util::{task::Context, FutureExt, Stream, StreamExt};
use parking_lot::{RwLock, RwLockReadGuard};
use std::sync::mpsc::{Receiver, Sender};
use std::{
collections::HashMap,
future::Future,
Expand Down Expand Up @@ -71,8 +71,8 @@ impl WfContext {
args: Vec<Payload>,
am_cancelled: watch::Receiver<bool>,
) -> (Self, Receiver<RustWfCmd>) {
// We need to use a normal std channel since our receiving side is non-async
let (chan, rx) = crossbeam_channel::unbounded();
// The receiving side is non-async
let (chan, rx) = std::sync::mpsc::channel();
(
Self {
namespace,
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/workflow_future.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ use crate::{
WorkflowResult,
};
use anyhow::{anyhow, bail, Context as AnyhowContext, Error};
use crossbeam_channel::Receiver;
use futures_util::{future::BoxFuture, FutureExt};
use std::sync::mpsc::Receiver;
use std::{
collections::{hash_map::Entry, HashMap},
future::Future,
Expand Down

0 comments on commit 90ef5ca

Please sign in to comment.