unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* The equivalent of racket's break-thread in guile?
@ 2013-05-30 23:40 Xin Wang
  2013-05-31  3:59 ` Nala Ginrut
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Xin Wang @ 2013-05-30 23:40 UTC (permalink / raw)
  To: guile-user

[-- Attachment #1: Type: text/plain, Size: 644 bytes --]

In Racket, break-thread is used to send an break exception to a thread[1].

E. g.

(let ((th (thread (lambda ()
            (dynamic-wind
              (lambda () #t)
              (lambda () (/ 1 0))
              (lambda () (sleep 5) (display "out-guard\n")))))))

  (sleep 1)
  (break-thread th))

For above code, out-guard part of dynmaic-wind will not be interrupted if
use break-thread to cancel a thread, and kill-thread will cancel thread
immediately.

In Guile, the equivalent of kill-thread is cancel-thread, and is there any
equivalent of break-thread?

[1] http://docs.racket-lang.org/reference/breakhandler.html

Regards,
Xin Wang

[-- Attachment #2: Type: text/html, Size: 1086 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2013-06-03 10:12 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-30 23:40 The equivalent of racket's break-thread in guile? Xin Wang
2013-05-31  3:59 ` Nala Ginrut
2013-05-31  6:24   ` Xin Wang
2013-05-31  6:55     ` Nala Ginrut
2013-05-31  8:44       ` Xin Wang
2013-05-31 10:33         ` Xin Wang
2013-05-31 12:16       ` Chaos Eternal
2013-06-01 23:27         ` Xin Wang
2013-05-31 10:01 ` Ludovic Courtès
2013-06-01 23:49   ` Xin Wang
2013-06-02  0:34     ` Nala Ginrut
2013-06-02  1:11       ` Xin Wang
2013-06-02 13:51     ` Ludovic Courtès
2013-06-03  1:37       ` Xin Wang
2013-06-03 10:12         ` Ludovic Courtès
2013-05-31 11:20 ` Taylan Ulrich B.
2013-05-31 23:28   ` Thien-Thi Nguyen
2013-06-01  6:46     ` Taylan Ulrich B.
2013-06-01 16:08       ` Thien-Thi Nguyen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).