From: Chaos Eternal <chaoseternal@shlug.org>
Cc: guile-user@gnu.org
Subject: Re: The equivalent of racket's break-thread in guile?
Date: Fri, 31 May 2013 20:16:30 +0800 [thread overview]
Message-ID: <CAGyY8Ns4GfJSdJz27F+=8W3Cn_oJ1DtRzNVgBtpwiP4o+sRt7w@mail.gmail.com> (raw)
In-Reply-To: <1369983337.2610.64.camel@Renee-desktop.suse>
IMHO, that means if you send a signal other than SIGSTOP SIGCONT
SIGKILL or SIGTERM, the signal will not affect the whole process.
also, SIGSTOP/SIGCONT and SIGKILL are un-catchable signals, they are
not offten used.
according the pthread_kill(3), you can send arbitrary signal to a
thread and, according to guile's manual, such signals can be catched.
they are just asyncs.
references:
pthread_kill(3)
6.21.2.1 System asyncs of guile manual.
On Fri, May 31, 2013 at 2:55 PM, Nala Ginrut <nalaginrut@gmail.com> wrote:
> On Fri, 2013-05-31 at 14:24 +0800, Xin Wang wrote:
>
>>
>>
>> Thank you for pointing out this.
>>
>>
>> After some more search, I found that pthread has function pthread_kill
>> [1], which can be used to send signal to specific thread.
>>
>>
>> No sure if it can be used to implement similar behaviour.
>>
>>
>> [1]
>> http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_kill.html
>
>
> At least in Linux, pthread_kill may effect the whole process:
> ----------------------------cut----------------------------------
> Signal dispositions are process-wide: if a signal handler is
> installed, the handler will be invoked in the thread thread,
> but if the disposition of the signal is "stop", "continue", or
> "terminate", this action will affect the whole process.
> ----------------------------end----------------------------------
>
> The real solution for your purpose is green-thread IMO.
>
>
>>
>>
>> > Regards,
>> > Xin Wang
>>
>>
>>
>>
>
>
>
next prev parent reply other threads:[~2013-05-31 12:16 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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='CAGyY8Ns4GfJSdJz27F+=8W3Cn_oJ1DtRzNVgBtpwiP4o+sRt7w@mail.gmail.com' \
--to=chaoseternal@shlug.org \
--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).