guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: The equivalent of racket's break-thread in guile?


From: Chaos Eternal
Subject: Re: The equivalent of racket's break-thread in guile?
Date: Fri, 31 May 2013 20:16:30 +0800

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 <address@hidden> 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
>>
>>
>>
>>
>
>
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]