Skip to content
Browse files

Fix annoying registration problems

  • Loading branch information
Shinmera committed Jan 11, 2020
1 parent 00990b2 commit 8f93b5d0557b32049deac1079c7bbb22ecc388aa
Showing with 1 addition and 6 deletions.
  1. +1 −6 subject.lisp
@@ -92,13 +92,8 @@
(dolist (event-loop (event-loops subject))
(add-handler handler event-loop))))

(defmethod register :before ((subject subject) (loop event-loop))
(when (find loop (event-loops subject))
(error "~s is already registered on the event-loop ~s."
subject loop)))

(defmethod register :after ((subject subject) (loop event-loop))
(push loop (event-loops subject)))
(pushnew loop (event-loops subject)))

(defmethod deregister :after ((subject subject) (loop event-loop))
(setf (event-loops subject) (remove loop (event-loops subject))))

0 comments on commit 8f93b5d

Please sign in to comment.
You can’t perform that action at this time.