Sure...I'll see if I can make a simpler reproducer. It seems like when you write something threads in any language simple goes out the door.
Yep. Didn't someone famous once say that threads is for those who can't work out how to use select()?
Maybe you're thinking of (the famous) Alan Cox's (famous) statement:
"A computer is a state machine. Threads are for people who cant program state machines."
http://lkml.org/lkml/2000/1/22/172
Sorry for offtopicness, -Ed