Skip to content

Commit

Permalink
processNogood -- remove abort, i do not understand yet, maybe need …
Browse files Browse the repository at this point in the history
…call/cc
  • Loading branch information
xieyuheng committed Oct 5, 2024
1 parent 1617646 commit 1a22a1d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
2 changes: 0 additions & 2 deletions src/nogood/processNogood.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import type { Reasons } from "../reason/index.js"
import { globalSchedulerAbort } from "../scheduler/index.js"

export function processNogood(reasons: Reasons): void {
const who = "processNogood"
console.log({ who, reasons })
globalSchedulerAbort()
}
7 changes: 1 addition & 6 deletions src/scheduler/schedule.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Propagator } from "../propagator/index.js"
import { globalScheduler } from "./initializeScheduler.js"

let allEverScheduledPropagators = new Set<Propagator>()
const allEverScheduledPropagators = new Set<Propagator>()

export function schedule(propagators: Array<Propagator>): void {
for (const propagator of propagators) {
Expand All @@ -16,8 +16,3 @@ export function schedule(propagators: Array<Propagator>): void {
export function scheduleAllEverScheduledPropagators(): void {
schedule(Array.from(allEverScheduledPropagators))
}

export function globalSchedulerAbort(): void {
globalScheduler.jobs = []
// allEverScheduledPropagators = new Set()
}

0 comments on commit 1a22a1d

Please sign in to comment.