Changeset 663


Ignore:
Timestamp:
Mar 17, 2004, 4:18:18 PM (21 years ago)
Author:
Gary Byers
Message:

Window-close on listener thread exit: don't wait around (deadlocks during QUIT.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/examples/cocoa-listener.lisp

    r655 r663  
    4848                 :perform-selector-on-main-thread (@selector "close")
    4949                 :with-object (%null-ptr)
    50                  :wait-until-done t))))
     50                 :wait-until-done nil))))
    5151   #'(lambda ()
    5252       (setq *listener-autorelease-pool* (create-autorelease-pool))
     
    126126
    127127
    128 
    129 
    130 
    131 
    132 
    133 
    134 
    135 (define-objc-method ((:id :delete-forward tv)  lisp-listener-window-controller)
    136   (with-slots (outpos filehandle) self
    137     (slet ((selection (send tv 'selected-range)))
    138       (let* ((textbuf (send tv 'text-storage))
    139              (length (send textbuf 'length)))
    140         (if (and (eql length (pref selection :<NSR>ange.location))
    141                  (or (eql outpos length)
    142                      (and (> length 1)
    143                           (= (send textbuf :character-at-index  (1- length))
    144                              (char-code #\NewLine)))))
    145           (%stack-block ((buf 1))
    146             (setf (%get-byte buf 0) (logand (char-code #\d) #x1f))
    147             (send filehandle
    148                   :write-data (send (@class ns-data)
    149                                     :data-with-bytes buf
    150                                     :length 1))
    151             (send filehandle 'synchronize-file)
    152                                         ;(#_NSLog #@"wrote ctrl-d packet")
    153             )
    154           (send tv :delete-forward self))
    155         self))))
    156 
    157 
    158 
    159 
    160 
    161128(define-objc-method ((:void dealloc) lisp-listener-window-controller)
    162129  (send (send (@class ns-notification-center) 'default-center)
Note: See TracChangeset for help on using the changeset viewer.