use hash-ref!
svn: r14438
This commit is contained in:
parent
c4e2e9af6d
commit
df56a8e3c1
|
@ -35,3 +35,8 @@
|
||||||
(cache-table-lookup! ct 'foo (lambda () #t))
|
(cache-table-lookup! ct 'foo (lambda () #t))
|
||||||
(cache-table-clear! ct)
|
(cache-table-clear! ct)
|
||||||
(cache-table-lookup! ct 'foo (lambda () #f)))))))
|
(cache-table-lookup! ct 'foo (lambda () #f)))))))
|
||||||
|
|
||||||
|
#|
|
||||||
|
(require (planet schematics/schemeunit:3/text-ui))
|
||||||
|
(run-tests cache-table-tests)
|
||||||
|
|#
|
|
@ -25,12 +25,7 @@
|
||||||
(call-with-semaphore
|
(call-with-semaphore
|
||||||
sema
|
sema
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(hash-ref
|
(hash-ref! ht entry-id entry-thunk))))))
|
||||||
ht entry-id
|
|
||||||
(lambda ()
|
|
||||||
(define entry (entry-thunk))
|
|
||||||
(hash-set! ht entry-id entry)
|
|
||||||
entry)))))))
|
|
||||||
|
|
||||||
(provide/contract
|
(provide/contract
|
||||||
[rename new-cache-table make-cache-table
|
[rename new-cache-table make-cache-table
|
||||||
|
|
Loading…
Reference in New Issue
Block a user