Skip to content

Commit

Permalink
fix default build
Browse files Browse the repository at this point in the history
Signed-off-by: Xinye <[email protected]>
  • Loading branch information
Xinye committed Oct 25, 2023
1 parent ea06e6c commit 7edecd3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,7 @@ impl FailPoint {

fn set_actions(&self, actions_str: &str, actions: Vec<Action>) {
loop {
#[cfg(feature = "async")]
self.async_pause_notify.notify_waiters();
// TODO: maybe busy waiting here.
match self.actions.try_write() {
Expand Down Expand Up @@ -674,7 +675,10 @@ impl FailPoint {
Task::Callback(f) => {
f.run();
}
Task::CallbackAsync(_) => unreachable!(),
#[cfg(feature = "async")]
Task::CallbackAsync(_) => panic!(
"to use async callback, please enable `async` feature and use `async_fail_point`"
),
}
None
}
Expand Down

0 comments on commit 7edecd3

Please sign in to comment.