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

support non_blocking attribute for symbols #14

Merged
merged 1 commit into from
Oct 18, 2021
Merged

support non_blocking attribute for symbols #14

merged 1 commit into from
Oct 18, 2021

Conversation

littledivy
Copy link
Member

Closes #6

Mark symbols to run on a dedicated blocking thread using the non_blocking attribute.

#[deno_bindgen(non_blocking)]
fn sleep(ms: u64) {
  let duration = std::time::Duration::from_millis(ms);
  std::thread::sleep(duration);
}

@littledivy littledivy merged commit 3fbaa41 into main Oct 18, 2021
@littledivy littledivy deleted the nonblocking branch October 18, 2021 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mark functions non-blocking with macro attributes
1 participant