Changeset 37010 in project


Ignore:
Timestamp:
12/16/18 22:02:55 (3 months ago)
Author:
kon
Message:

manifesto after exercise

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/5/synch/trunk/tests/synch-continuation-test.scm

    r37007 r37010  
    99      (chicken type)
    1010      (only (chicken fixnum) fx= fx+ fx- fxmod)
     11      (only (chicken bitwise) integer-length)
    1112      (only (chicken random) pseudo-random-integer) )
    1213    (define platform-random pseudo-random-integer) )
    1314  (chicken-4
    1415    (use
    15       (only chicken fx= fx+ fx- fxmod)
     16      (only chicken arithmetic-shift fx= fx+ fx- fxmod)
    1617      (only extras random))
    17     (define platform-random random) ) )
     18    (define platform-random random)
     19    (define (integer-length n)
     20      (if (negative? n)
     21        (add1 (integer-length (abs n)))
     22        (do (
     23              (i 1 (add1 i))
     24              (n (arithmetic-shift n -1) (arithmetic-shift n -1)) )
     25            ((zero? n) i) ) ) ) ) )
    1826
    1927(: vector-shuffle! ((vector-of *) #!optional (procedure (fixnum) fixnum) -> void))
     
    2836        (vector-set! vec i (vector-ref vec i+1))
    2937        (vector-set! vec i+1 tmp) ) )
    30     (do ((n len (fx- n 1)))
     38    (do ((n (integer-length len) (fx- n 1)))
    3139        ((fx= n 0))
    3240      (swap-adj! (rnd len)) ) ) )
     
    125133
    126134(define *statement* #<<EOS
    127 ;*** Tests Will Fail ***
    128 ;Which depends on how threads are scheduled.
    129 ;Shows a reasonable use of an exit continuation breaks the implied
    130 ;"isolation". Need to know what is being synch'ed.
    131 ;Coroutine Generators OK, Dynamic-Lambda, not OK.
     135*** Tests Will Fail ***
     136Which depends on how threads are scheduled.
     137
     138Shows a reasonable use of an exit continuation
     139breaks the implied "isolation".
     140
     141Need to know what is being synch'ed.
     142Coroutine Generators OK, Dynamic-Lambda, not OK.
    132143EOS
    133144)
     
    205216;(test-begin "Synch Examples") ;interesting: test impl artifact?
    206217
     218(run-in-threads)
     219
     220(test-end "Synch Examples")
     221
    207222(print *statement*)
    208 (run-in-threads)
    209 
    210 (test-end "Synch Examples")
    211223
    212224(test-exit)
Note: See TracChangeset for help on using the changeset viewer.