[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Do gui applications always have 2 threads ?
From: |
Philippe Roussel |
Subject: |
Do gui applications always have 2 threads ? |
Date: |
Sat, 22 Jan 2011 21:54:53 +0100 |
Hi all,
In trying to understand why my application randomly blocks, I found that
it always has 2 threads running and I don't know what the second one is
for.
It seems this thread is waiting on some condition lock :
#0 0xb7fe2424 in __kernel_vsyscall ()
#1 0xb7428015 in pthread_cond_wait@@GLIBC_2.3.2 () at
../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:122
#2 0xb76639dd in __pthread_cond_wait (cond=0x80de870, mutex=0x80de858) at
forward.c:139
#3 0xb771d14f in ?? () from
/opt/GNUstep-trunk/Local/Library/Libraries/libobjc.so.4
#4 0xb742396e in start_thread (arg=0xb5db6b70) at pthread_create.c:300
#5 0xb7656a4e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130
Once I saw my main thread blocked on the same condition/mutex (I think
it was load_lock in NSBundle) : deadlock.
I'm wondering if my code is responsible by doing too much work in
+initialize methods (ie creating singleton).
Can someone explain where does this thread come from ?
Thanks,
Philippe
- Do gui applications always have 2 threads ?,
Philippe Roussel <=