diff --git a/src/index.ts b/src/index.ts index ffac842..aade98f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,3 @@ -import { deferedSpawn } from "async-spawner"; import Emittery from "emittery"; import { promisify } from "util"; @@ -78,16 +77,16 @@ class AbortablePromise extends Promise { // setTimeout(() => a.abort(), 1500); -const b = new AbortablePromise(async function* (await_or_abort) { - const ping = await deferedSpawn("ping", ["8.8.8.8"]); - while (true) { - console.log( - await await_or_abort(ping.waitForNextData(), () => { - ping.kill(); - }) - ); - yield; - } -}); +// const b = new AbortablePromise(async function* (await_or_abort) { +// const ping = await deferedSpawn("ping", ["8.8.8.8"]); +// while (true) { +// console.log( +// await await_or_abort(ping.waitForNextData(), () => { +// ping.kill(); +// }) +// ); +// yield; +// } +// }); -setTimeout(() => b.abort(), 5000); +// setTimeout(() => b.abort(), 5000);