Skip to content

Commit

Permalink
some change for SBCL / ECL
Browse files Browse the repository at this point in the history
  • Loading branch information
byulparan authored and byulparan committed Mar 13, 2017
1 parent 17fa8b7 commit bccd3a1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 77 deletions.
6 changes: 2 additions & 4 deletions scheduler.asd
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@
:name "scheduler"
:author "Park Sungmin. byulparan@icloud.com"
:description "The Time Based Task Scheduler"
:version "0.1.5"
:version "2017-03-14"
:depends-on (#:bordeaux-threads #:pileup #:cffi #+ecl #:bt-semaphore)
:serial t
:components ((:file "package")
#+windows (:file "threads-windows")
#-windows (:file "threads-posix")
(:file "time")
(:file "scheduler")
;; (:file "sync-tool")
))
(:file "scheduler")))
32 changes: 2 additions & 30 deletions scheduler.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -124,35 +124,7 @@
"Stop the scheduler."
(when (eql (sched-status scheduler) :running)
(bt:destroy-thread (sched-thread scheduler))
;; when kill thread by destroy-thread then join-thread not work in sbcl
#-sbcl (bt:join-thread (sched-thread scheduler))
(setf (sched-status scheduler) :stop)))



;;; functions for main scheduler ---------------------------------------------------------------------
;;; Scheduler library have *main-scheduler*. This API are functions for only *main-scheduler*.
;;; Unless you needs multiple scheduler, use this API.

;; (defparameter *main-scheduler* (make-instance 'scheduler :name "main"))

;; (defparameter *scheduling-mode* :realtime)

;; (defun callback (time f &rest args)
;; (ecase *scheduling-mode*
;; (:realtime (sched-add *main-scheduler* time (lambda () (apply f args))) )
;; (:step (apply f args))))

;; (defun scheduler-running-p ()
;; (eql (sched-status *main-scheduler*) :running))

;; (defun scheduler-start ()
;; (sched-run *main-scheduler*))

;; (defun scheduler-clear ()
;; (sched-clear *main-scheduler*))

;; (defun scheduler-stop ()
;; (sched-stop *main-scheduler*))

;; (defun now ()
;; (sched-time *main-scheduler*))

43 changes: 0 additions & 43 deletions sync-tool.lisp

This file was deleted.

0 comments on commit bccd3a1

Please sign in to comment.