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: Nala Ginrut
Subject: Re: The equivalent of racket's break-thread in guile?
Date: Fri, 31 May 2013 14:55:37 +0800

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]