repo.or.cz
/
scheme-dev.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
Add qsort3.
[scheme-dev.git]
/
with-barrier.scm
blob
d1312ecdc761982b8f04640b1a1a553fca6153ee
1
(define a)
2
3
;; entering a barrier
4
(with-continuation-barrier
5
(lambda ()
6
(call/cc
7
(lambda (k)
8
(set! a k)
9
1
10
))))
11
12
(a) ;exception!
13
14
15
;;;; leaving a barrier
16
(call/cc
17
(lambda (k)
18
(set! a k)
19
1
20
))
21
22
(with-continuation-barrier
23
(lambda () (a))) ;exception!