From: Xin Wang <dram.wang@gmail.com>
To: guile-user@gnu.org
Subject: The equivalent of racket's break-thread in guile?
Date: Fri, 31 May 2013 07:40:36 +0800 [thread overview]
Message-ID: <CAHjSAjVRYzPHdJXZTsn=7s1K_uLCCz-25i9CLJmri1t3-YeE5w@mail.gmail.com> (raw)
[-- 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 --]
next reply other threads:[~2013-05-30 23:40 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-30 23:40 Xin Wang [this message]
2013-05-31 3:59 ` The equivalent of racket's break-thread in guile? 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAHjSAjVRYzPHdJXZTsn=7s1K_uLCCz-25i9CLJmri1t3-YeE5w@mail.gmail.com' \
--to=dram.wang@gmail.com \
--cc=guile-user@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).