17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
(prefix sqlite3 sqlite3:)
pkts
)
(declare (unit common))
(include "common_records.scm")
;; (require-library margs)
;; (include "margs.scm")
;; (define old-exit exit)
;;
;; (define (exit . code)
|
>
|
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
(prefix sqlite3 sqlite3:)
pkts
)
(declare (unit common))
(include "common_records.scm")
;; (require-library margs)
;; (include "margs.scm")
;; (define old-exit exit)
;;
;; (define (exit . code)
|
2626
2627
2628
2629
2630
2631
2632
|
((string? new-val)
(setenv env-var new-val)))
restore-thunk))
delta-env-alist))))
(let ((rv (thunk)))
(for-each (lambda (x) (x)) restore-thunks) ;; restore env to original state
rv)))
|
>
>
>
>
>
>
|
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
|
((string? new-val)
(setenv env-var new-val)))
restore-thunk))
delta-env-alist))))
(let ((rv (thunk)))
(for-each (lambda (x) (x)) restore-thunks) ;; restore env to original state
rv)))
(define (common:send-thunk-to-background-thread thunk #!key (name #f))
;;(BB> "launched thread " name)
(if name
(thread-start! (make-thread thunk name))
(thread-start! (make-thread thunk))))
|