Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Jan 2000 02:59:18 -0800
From:      Jason Evans <jasone@canonware.com>
To:        ROGIER MULHUIJZEN <MULHUIJZEN@PZH.NL>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Fwd: Re: GTK & threading on FreeBSD (and possibly other unices)
Message-ID:  <20000113025918.J302@sturm.canonware.com>
In-Reply-To: <s87da8a1.029@smtp.pzh.nl>; from MULHUIJZEN@PZH.NL on Thu, Jan 13, 2000 at 10:27:23AM %2B0100
References:  <s87da8a1.029@smtp.pzh.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000113025918.J302>