Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use mpsc instead crossbeam-channel #826

Merged
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 = "0.3"
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,7 +11,7 @@ use crate::{
IntoUpdateValidatorFunc, RustWfCmd, SignalExternalWfResult, TimerResult, UnblockEvent,
Unblockable, UpdateFunctions,
};
use crossbeam_channel::{Receiver, Sender};
use std::sync::mpsc::{Receiver, Sender};
use futures::{task::Context, FutureExt, Stream, StreamExt};
use parking_lot::{RwLock, RwLockReadGuard};
use std::{
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,7 +4,7 @@ use crate::{
WorkflowResult,
};
use anyhow::{anyhow, bail, Context as AnyhowContext, Error};
use crossbeam_channel::Receiver;
use std::sync::mpsc::Receiver;
use futures::{future::BoxFuture, FutureExt};
use std::{
collections::{hash_map::Entry, HashMap},
Expand Down
Loading