1
0
Fork 0

- removed another recursive thread locking ('push-downloading-behind').

This commit is contained in:
cage 2023-12-07 17:47:00 +01:00
parent c613cefa13
commit 7d9f3beffa
1 changed files with 8 additions and 5 deletions

View File

@ -197,8 +197,10 @@
(wrapped-in-lock (*events-queue*)
(remove-element-if *events-queue* predicate)))
(defun map-events (fn)
(defun map-events (fn &key (lock-queue t))
(if lock-queue
(wrapped-in-lock (*events-queue*)
(map-elements *events-queue* fn))
(map-elements *events-queue* fn)))
;;;; generic events
@ -1497,12 +1499,13 @@
(defclass gemini-push-behind-downloading-event (program-event) ())
(defun push-downloading-behind ()
(defun push-downloading-behind (&key (lock-queue nil))
(map-events (lambda (a)
(when (typep a 'gemini-got-line-event)
(setf (skip-rendering a) t)
(setf (priority a) +minimum-event-priority+))
a)))
a)
:lock-queue lock-queue))
(defmethod process-event ((object gemini-push-behind-downloading-event))
(push-downloading-behind))