Changeset 35167 in project


Ignore:
Timestamp:
02/20/18 01:17:15 (7 months ago)
Author:
kon
Message:

remove unneeded , simplify

Location:
release/4/synch/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • release/4/synch/trunk/format-synch.scm

    r35091 r35167  
    99(import scheme chicken)
    1010(use
    11   (srfi 18)
    12   (rename format (format single-format))
    13   synch)
     11  (rename format (format original-format))
     12  (only synch synchonized-procedure) )
    1413
    15 (define *FORMAT-MUTEX* (make-mutex 'format-synch))
    16 
    17 (define (format dst fmt . args)
    18   (apply-synch *FORMAT-MUTEX* single-format dst fmt args) )
     14(define format (synchonized-procedure original-format))
    1915
    2016) ;format-synch
  • release/4/synch/trunk/synch.scm

    r35162 r35167  
    4949  define-operation-%synch
    5050  ;
    51   synchonized-procedure
    52   synchonized-procedure?
    53   synchonized-apply
     51  synchronized-procedure
    5452  ;;
    5553  ;DEPRECATED
     
    696694;;
    697695
    698 (define (synchonized-procedure proc)
    699   (make-synch-with-object proc 'synchonized-procedure) )
    700 
    701 (define (synchonized-procedure? obj)
    702   (synch-with-object? obj procedure?) )
    703 
    704 (define (synchonized-apply mtx . rest)
    705   (check-synch-with-object 'apply-synchonized-procedure mtx)
    706   (let-synch-with ((obj mtx))
    707     (let ((proc (check-procedure 'apply-synchonized-procedure obj)))
    708       (apply proc rest) ) ) )
     696(define (synchronized-procedure proc)
     697  (let ((mtx (make-synch-with-object proc 'synchronized-procedure)))
     698    (lambda args
     699      (synch-with mtx proc
     700        (apply proc args)) ) ) )
    709701
    710702;;
Note: See TracChangeset for help on using the changeset viewer.