From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nala Ginrut Newsgroups: gmane.lisp.guile.user Subject: Re: The equivalent of racket's break-thread in guile? Date: Fri, 31 May 2013 14:55:37 +0800 Organization: HFG Message-ID: <1369983337.2610.64.camel@Renee-desktop.suse> References: <1369972797.2610.57.camel@Renee-desktop.suse> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1369983360 32067 80.91.229.3 (31 May 2013 06:56:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 31 May 2013 06:56:00 +0000 (UTC) Cc: guile-user@gnu.org To: Xin Wang Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Fri May 31 08:55:58 2013 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UiJFm-0003Kq-2R for guile-user@m.gmane.org; Fri, 31 May 2013 08:55:58 +0200 Original-Received: from localhost ([::1]:44544 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UiJFl-0002hB-H5 for guile-user@m.gmane.org; Fri, 31 May 2013 02:55:57 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47484) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UiJFW-0002gu-VC for guile-user@gnu.org; Fri, 31 May 2013 02:55:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UiJFV-0002aj-Ts for guile-user@gnu.org; Fri, 31 May 2013 02:55:42 -0400 Original-Received: from mail-pd0-f173.google.com ([209.85.192.173]:46493) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UiJFV-0002ad-Ms for guile-user@gnu.org; Fri, 31 May 2013 02:55:41 -0400 Original-Received: by mail-pd0-f173.google.com with SMTP id v14so1711435pde.4 for ; Thu, 30 May 2013 23:55:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:subject:from:to:cc:date:in-reply-to:references :organization:content-type:x-mailer:mime-version :content-transfer-encoding; bh=d4c8g4Be3PVPWJM2kdE0smyUrSU5rqHZAlfAj+LYYDA=; b=heu/nkNWyYyivfM7js2ph09rVsBIv4T+Ny/8UduG90PrS2PCtkkmNIa4w98aR40U4N 8qDW8uExJPr1P6TyOlcRG+hBpHQPhdy6GHOVthr1LsWBMKa0qHb/1ovSO0JRiKkgvFNr 6wXR0+s700ptOVp2nr1cqhNSQNXPHjQ/mHW20c9iyyqmlyGbB7/wQBJqEOKpah3LDb7Z Ppa8i6J5hYXl2iPBM2SH9LwgRrVagGRQ+ObtdbL8uoaYV7chimC1iJ8apWk4to+FxYxU zO5x9/nAYcP2avSRE+WvoZeqHFMib7KJpErKVciBu1W4NX4dIcmj9W5e3l91x8+4u8R5 Tm2A== X-Received: by 10.66.189.130 with SMTP id gi2mr12233915pac.89.1369983340627; Thu, 30 May 2013 23:55:40 -0700 (PDT) Original-Received: from [147.2.147.115] ([61.14.130.226]) by mx.google.com with ESMTPSA id xz1sm17898625pab.5.2013.05.30.23.55.38 for (version=SSLv3 cipher=RC4-SHA bits=128/128); Thu, 30 May 2013 23:55:40 -0700 (PDT) In-Reply-To: X-Mailer: Evolution 3.4.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.192.173 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:10391 Archived-At: 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 > > > >