mirror of
https://github.com/denoland/deno.git
synced 2024-12-21 23:04:45 -05:00
signal APIs should require --unstable (#4926)
This commit is contained in:
parent
7a94ea08e9
commit
62976a1c94
1 changed files with 6 additions and 3 deletions
|
@ -40,10 +40,11 @@ struct SignalArgs {
|
|||
#[cfg(unix)]
|
||||
fn op_signal_bind(
|
||||
isolate: &mut CoreIsolate,
|
||||
_state: &State,
|
||||
state: &State,
|
||||
args: Value,
|
||||
_zero_copy: Option<ZeroCopyBuf>,
|
||||
) -> Result<JsonOp, OpError> {
|
||||
state.check_unstable("Deno.signal");
|
||||
let args: BindSignalArgs = serde_json::from_value(args)?;
|
||||
let mut resource_table = isolate.resource_table.borrow_mut();
|
||||
let rid = resource_table.add(
|
||||
|
@ -61,10 +62,11 @@ fn op_signal_bind(
|
|||
#[cfg(unix)]
|
||||
fn op_signal_poll(
|
||||
isolate: &mut CoreIsolate,
|
||||
_state: &State,
|
||||
state: &State,
|
||||
args: Value,
|
||||
_zero_copy: Option<ZeroCopyBuf>,
|
||||
) -> Result<JsonOp, OpError> {
|
||||
state.check_unstable("Deno.signal");
|
||||
let args: SignalArgs = serde_json::from_value(args)?;
|
||||
let rid = args.rid as u32;
|
||||
let resource_table = isolate.resource_table.clone();
|
||||
|
@ -87,10 +89,11 @@ fn op_signal_poll(
|
|||
#[cfg(unix)]
|
||||
pub fn op_signal_unbind(
|
||||
isolate: &mut CoreIsolate,
|
||||
_state: &State,
|
||||
state: &State,
|
||||
args: Value,
|
||||
_zero_copy: Option<ZeroCopyBuf>,
|
||||
) -> Result<JsonOp, OpError> {
|
||||
state.check_unstable("Deno.signal");
|
||||
let args: SignalArgs = serde_json::from_value(args)?;
|
||||
let rid = args.rid as u32;
|
||||
let mut resource_table = isolate.resource_table.borrow_mut();
|
||||
|
|
Loading…
Reference in a new issue