Changeset 5020
- Timestamp:
- Aug 25, 2006, 7:17:15 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/ccl/level-1/l1-events.lisp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ccl/level-1/l1-events.lisp
r4446 r5020 179 179 180 180 181 (defun event-poll()182 (with-lock-grabbed -maybe(*auto-flush-streams-lock*)181 (defun auto-flush-interactive-streams () 182 (with-lock-grabbed (*auto-flush-streams-lock*) 183 183 (dolist (s *auto-flush-streams*) 184 (when (open-stream-p s) 185 (stream-maybe-force-output s))))) 186 184 (when (and (open-stream-p s) 185 (ioblock-outbuf-lock (stream-ioblock s t))) 186 (maybe-stream-force-output s))))) 187 188 (defun add-autoflush-stream (s) 189 (with-lock-grabbed (*auto-flush-streams-lock*) 190 (unless (member s *auto-flush-streams*) 191 (let* ((ioblock (stream-ioblock s t))) 192 (unless (ioblock-outbuf-lock ioblock) 193 (setf (ioblock-outbuf-lock ioblock) (make-lock) 194 (ioblock-owner ioblock) nil))) 195 (push s *auto-flush-streams*)))) 196 197 (defun remove-autoflush-stream (s) 198 (with-lock-grabbed (*auto-flush-streams-lock*) 199 (setq *auto-flush-streams* (delete s *auto-flush-streams*)))) 187 200 188 201 ; Is it really necessary to keep this guy in a special variable ? 189 202 (defloadvar *event-dispatch-task* 190 203 (%install-periodic-task 191 ' event-poll192 ' event-poll204 'auto-flush-interactive-streams 205 'auto-flush-interactive-streams 193 206 33 194 207 (+ $ptask_draw-flag $ptask_event-dispatch-flag)))
Note:
See TracChangeset
for help on using the changeset viewer.
