Re: bug in thread-test.c



Hello Sebastian,

On Tue, Feb 12, 2002 at 02:43:56PM +0100, Sebastian Wilhelmi wrote:
> Hi Miroslaw ,
> 
> 
> While in theory you are right, I think in practice for a test this is
> OK. It is to test, whether the locks work, in a real program of course
> you shouldn't make such assumptions. gthread_join wouldn't solve this,
> because for the test indeed I want to have both threads run concurrently
> and I want test_g_mutex_thread to really return FALSE for lines 13 and
> 14 and to really hang in line 15. 
> 
> However this could as well be solved with busy wait, I agree, what do
> you think about the appanded patch.
I miss the attachment

> It removes all g_usleep, that just
> wait for a thread to start and run till it blocks, but leaves those
> g_usleep in, which say: Wait sometime, if it breaks or not.
Should be OK.

My problem is the following. I compile and run the tests on havy loaded
system. This test heppens to fail each time for the reason I have pointed out.

I have tryied to replace g_usleep() with g_thread_join(), but the test hang
while joining. It does not accept any signals but KILL; running on AIX43 with
posix threads. Any idea why?

Bye
-- 
Miroslaw Dobrzanski-Neumann

MOSAIC SOFTWARE AG
Base Development and Research
Tel +49-2225-882-291
Fax +49-2225-882-201
E-mail: mne mosaic-ag com




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]