Date: Fri, 7 Aug 1998 10:06:43 -0400 From: Brian Cully <shmit@kublai.com> To: Daniel Eischen <eischen@vigrid.com> Cc: freebsd-current@FreeBSD.ORG Subject: Re: Pthreads woes revisited. Message-ID: <19980807100643.33286@kublai.com> In-Reply-To: <199808062113.RAA18177@pcnet1.pcnet.com>; from Daniel Eischen on Thu, Aug 06, 1998 at 05:13:02PM -0400 References: <199808062113.RAA18177@pcnet1.pcnet.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Aug 06, 1998 at 05:13:02PM -0400, Daniel Eischen wrote: > You're not adding the pthread_yield() call that I added after > the pthread_cond_signal(). Your program is bogus because there > is no guarantee that the main thread will release the CPU in > order for the other task to run. You need to perform some > sort of blocking operation after the pthread_cond_signal. I > chose to use pthread_yield, although sleep would work just as > well. Do'h! I missed that. That did make the sample program work, so it looks like the error was mine all along, sorry for troubling everybody. -bjc To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980807100643.33286>