From owner-freebsd-hackers Fri Jan 29 00:05:58 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id AAA09947 for freebsd-hackers-outgoing; Fri, 29 Jan 1999 00:05:58 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from itp.ac.ru (itp.ac.ru [193.233.32.4]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id AAA09937 for ; Fri, 29 Jan 1999 00:05:54 -0800 (PST) (envelope-from ks@itp.ac.ru) Received: from speecart.chg.ru (speecart.chg.ru [193.233.46.2]) by itp.ac.ru (8.9.1/8.9.1) with ESMTP id LAA07009; Fri, 29 Jan 1999 11:09:22 +0300 (MSK) Message-ID: X-Mailer: XFMail 1.2 [p0] on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <199901290800.TAA13084@cimlogic.com.au> Date: Fri, 29 Jan 1999 11:06:21 +0300 (MSK) Organization: Landau Institute for Theoretical Physics From: "Sergey S. Kosyakov" To: John Birrell Subject: Re: select and threads again Cc: freebsd-hackers@FreeBSD.ORG Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Dear John, Thank you for your quick answer. But there is problem with ILU I trying to solve. For each operation on each TCP socket ILU starts new thread, which inturn calls select(). I trace this processes and found that if two threads in the same time calls select (with timeout=infinity) on different sockets that only the last thread stays operational. The first thread hangs forever on select(). May be there are some underwater stones? I compile and link ILU with "cc -g -pthread", nothing more. On 29-Jan-99 John Birrell wrote: > Sergey S. Kosyakov wrote: > [Charset KOI8-R unsupported, filtering to ASCII...] >> >> Hi, >> >> I did not receive answer on previous mail, so again: is select(2) really >> thread-safe in 3.0R? In detail: can I call select in a number of concurrent >> threads, e.g., for connection or data waiting? This is essential of Xerox >> ILU >> operations in multy-thread mode. > > If you link with libc_r, yes. > > -- > John Birrell - jb@cimlogic.com.au; jb@freebsd.org http://www.cimlogic.com.au/ > CIMlogic Pty Ltd, GPO Box 117A, Melbourne Vic 3001, Australia +61 418 353 137 --- ---------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message