Skip to content
Merged
Changes from all 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
8 changes: 4 additions & 4 deletions crates/bashkit-js/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ impl Bash {
/// Execute bash commands synchronously.
#[napi]
pub fn execute_sync(&self, commands: String) -> napi::Result<ExecResult> {
self.state.cancelled.store(false, Ordering::Relaxed);
self.state.cancelled.store(false, Ordering::SeqCst);
block_on_with(&self.state, |s| async move {
let mut bash = s.inner.lock().await;
match bash.exec(&commands).await {
Expand Down Expand Up @@ -342,7 +342,7 @@ impl Bash {
/// command boundary.
#[napi]
pub fn cancel(&self) {
self.state.cancelled.store(true, Ordering::Relaxed);
self.state.cancelled.store(true, Ordering::SeqCst);
}

/// Reset interpreter to fresh state, preserving configuration.
Expand Down Expand Up @@ -604,7 +604,7 @@ impl BashTool {
/// Execute bash commands synchronously.
#[napi]
pub fn execute_sync(&self, commands: String) -> napi::Result<ExecResult> {
self.state.cancelled.store(false, Ordering::Relaxed);
self.state.cancelled.store(false, Ordering::SeqCst);
block_on_with(&self.state, |s| async move {
let mut bash = s.inner.lock().await;
match bash.exec(&commands).await {
Expand Down Expand Up @@ -670,7 +670,7 @@ impl BashTool {
/// Cancel the currently running execution.
#[napi]
pub fn cancel(&self) {
self.state.cancelled.store(true, Ordering::Relaxed);
self.state.cancelled.store(true, Ordering::SeqCst);
}

/// Reset interpreter to fresh state, preserving configuration.
Expand Down
Loading