From owner-freebsd-hackers Thu Jan 13 2:59:41 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from canonware.com (canonware.com [207.20.242.18]) by hub.freebsd.org (Postfix) with SMTP id E7FED14CA6 for ; Thu, 13 Jan 2000 02:59:38 -0800 (PST) (envelope-from jasone@canonware.com) Received: (qmail 10818 invoked by uid 1001); 13 Jan 2000 10:59:18 -0000 Date: Thu, 13 Jan 2000 02:59:18 -0800 From: Jason Evans To: ROGIER MULHUIJZEN Cc: freebsd-hackers@freebsd.org Subject: Re: Fwd: Re: GTK & threading on FreeBSD (and possibly other unices) Message-ID: <20000113025918.J302@sturm.canonware.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: ; from MULHUIJZEN@PZH.NL on Thu, Jan 13, 2000 at 10:27:23AM +0100 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, Jan 13, 2000 at 10:27:23AM +0100, ROGIER MULHUIJZEN wrote: > I'm forwarding this from the GTK development list. According to Owen > their is something wrong with the threads implementation.... > > Is that true? or is it a "It's not the way Linux works, so it must be > wrong"-pigheadedness? =) Chances are that there is a bug in the application in question. Buggy threaded programs behave differently, depending on the underlying threads implememtation, so the brokenness may not be apparent on another platform. The email exchange that you forwarded doesn't give too much insight into what the problem is (at least not that I picked up). However, the fact that the author thinks sleep(0) is a good idea for encouraging thread switching isn't a good sign (i.e. the author probably doesn't have a good grasp on threaded programming), and makes me further suspect that the application in question is buggy. Chances are good that the application has one or more threads in a buzz loop, which is causing the GUI thread to starve. On Linux, the fact that threads are scheduled by the kernel may nice down the buzzing threads and make the application appear to be working okay. This is all highly speculative. Take it for what it's worth. =) Jason To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message