frida / frida-node

Frida Node.js bindings
281 stars 65 forks source link

Cancellable.combine #99

Closed hsorbo closed 2 months ago

hsorbo commented 2 months ago

Cancellable.combine allows for combining cancellations. This can be useful in scenarios like combining timeouts or combining timeout with user cancellation.

function doSomething(cancellable) {
    const connectTimeout = cancellable.combine(Cancellable.withTimeout(2000));
    const appservice = await device.openService('xpc:com.apple.coredevice.appservice', connectTimeout);
}