Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions scheduler.rkt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#lang racket/base

(require racket/async-channel
racket/match)
racket/match
"version.rkt")

;; Scheduler manages a list of asynchronous and cancellable tasks for each document.
;; For each document, a task is uniquely identified by its key.
Expand All @@ -24,7 +25,10 @@
(define th (hash-ref doc type))
(unless (thread-dead? th)
(kill-thread th)))
(hash-set! doc type (thread task)))))
(hash-set! doc type
(if (version>=9.0?)
(thread #:pool 'own task)
(thread task))))))
(loop)))

(define _scheduler (thread schedule))
Expand Down
12 changes: 12 additions & 0 deletions version.rkt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#lang racket

(provide version>=9.0?)

(require version/utils)

(define (version>=? target-version)
(not (version<? (version) target-version)))

(define (version>=9.0?)
(version>=? "9.0"))