Changeset 13510 in project


Ignore:
Timestamp:
03/05/09 17:12:21 (11 years ago)
Author:
Kon Lovett
Message:

Use of unique object instead of interned symbol for "unblocked" signal.

Location:
release/4/mailbox
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • release/4/mailbox/tags/2.0.0/mailbox.scm

    r13503 r13510  
    66;; - Depends on "library.scm" declaring '(disable-interrupts)'.
    77;;
    8 ;; - Depends on thread internals! Layout of thread record, return value
    9 ;; for a resumed thread.
    10 ;;
    118;; - Uses ##sys#current-thread & ##sys#thread-unblock!
    129;;
    13 ;; - Note use of 'undefined' returned value to signal an empty mailbox.
     10;; - Note use of 'undefined-value' to signal an empty mailbox.
    1411
    1512(declare
     
    200197  (only chicken
    201198    optional                ;due to #!optional implementation
     199    let-optionals           ;due to #!optional implementation
    202200    handle-exceptions       ;due to condition-case implementation
    203     let-optionals           ;due to let-values implementation
    204     with-exception-handler  ;due to condition-case  implementation
     201    with-exception-handler  ;due to handle-exceptions implementation
    205202    and-let* let-values
    206203    unless when
     
    282279   (make-property-condition 'exn
    283280    'location loc
     281    'message "mailbox timeout occured"
    284282    'arguments (if (%undefined-value? to-def) (list to-tim) (list to-tim to-def)))
    285283   (make-property-condition 'mailbox)
     
    288286
    289287;;; Mailbox Threading
     288
     289(define UNBLOCKED-TAG '#())
    290290
    291291(define (ready-mailbox! mb)
     
    298298          (when (%thread-blocked-for-timeout? thread)
    299299            (##sys#thread-unblock! thread)
    300             (thread-signal! thread 'unblocked) )
     300            (thread-signal! thread UNBLOCKED-TAG) )
    301301          ; else suspended
    302302          (thread-resume! thread) ) ) )
     
    315315          [exn ()
    316316            ; Unless unblocked "early" propagate exception
    317             (if (eq? 'unblocked exn)
     317            (if (eq? UNBLOCKED-TAG exn)
    318318                (set! early? #t)
    319319                (signal exn) ) ] )
  • release/4/mailbox/trunk/mailbox.scm

    r13503 r13510  
    66;; - Depends on "library.scm" declaring '(disable-interrupts)'.
    77;;
    8 ;; - Depends on thread internals! Layout of thread record, return value
    9 ;; for a resumed thread.
    10 ;;
    118;; - Uses ##sys#current-thread & ##sys#thread-unblock!
    129;;
    13 ;; - Note use of 'undefined' returned value to signal an empty mailbox.
     10;; - Note use of 'undefined-value' to signal an empty mailbox.
    1411
    1512(declare
     
    200197  (only chicken
    201198    optional                ;due to #!optional implementation
     199    let-optionals           ;due to #!optional implementation
    202200    handle-exceptions       ;due to condition-case implementation
    203     let-optionals           ;due to let-values implementation
    204     with-exception-handler  ;due to condition-case  implementation
     201    with-exception-handler  ;due to handle-exceptions implementation
    205202    and-let* let-values
    206203    unless when
     
    282279   (make-property-condition 'exn
    283280    'location loc
     281    'message "mailbox timeout occured"
    284282    'arguments (if (%undefined-value? to-def) (list to-tim) (list to-tim to-def)))
    285283   (make-property-condition 'mailbox)
     
    288286
    289287;;; Mailbox Threading
     288
     289(define UNBLOCKED-TAG '#())
    290290
    291291(define (ready-mailbox! mb)
     
    298298          (when (%thread-blocked-for-timeout? thread)
    299299            (##sys#thread-unblock! thread)
    300             (thread-signal! thread 'unblocked) )
     300            (thread-signal! thread UNBLOCKED-TAG) )
    301301          ; else suspended
    302302          (thread-resume! thread) ) ) )
     
    315315          [exn ()
    316316            ; Unless unblocked "early" propagate exception
    317             (if (eq? 'unblocked exn)
     317            (if (eq? UNBLOCKED-TAG exn)
    318318                (set! early? #t)
    319319                (signal exn) ) ] )
Note: See TracChangeset for help on using the changeset viewer.