Re: Mutex or atomic operations for multithread app?

2006-11-12 Thread Peter Lund
On Sat, 2006-11-11 at 14:29 +0100, Tomasz Jankowski wrote: I looking for someone, who will say if my idea is bad or good ;) I have an object based on GObject, which have quite many int variables. This object is used by many threads and i'm wondering if I really need to use mutex when I want

Mutex or atomic operations for multithread app?

2006-11-11 Thread Tomasz Jankowski
Hi there! I looking for someone, who will say if my idea is bad or good ;) I have an object based on GObject, which have quite many int variables. This object is used by many threads and i'm wondering if I really need to use mutex when I want to access those variables. Can I use atomically access

Re: Mutex or atomic operations for multithread app?

2006-11-11 Thread John Cupitt
On 11/11/06, Tomasz Jankowski [EMAIL PROTECTED] wrote: I looking for someone, who will say if my idea is bad or good ;) I have an object based on GObject, which have quite many int variables. This object is used by many threads and i'm wondering if I really need to use mutex when I want to

Re: multithread

2005-11-17 Thread Chris Vine
On Wednesday 16 November 2005 11:21, yeajchao wrote: Hello everybody my program involved in multithread but I have no any idea about it in my program,there need two threads,and each thread has a timer when the timer is timeout ,it will awake the corresponding thread

multithread

2005-11-16 Thread yeajchao
Hello everybody my program involved in multithread but I have no any idea about it in my program,there need two threads,and each thread has a timer when the timer is timeout ,it will awake the corresponding thread, and after the thread finished its work,it will sleep again

Re: multithread

2005-11-16 Thread Bryan Christ
(timer_length); } g_thread_exit(anything); } Bryan yeajchao wrote: Hello everybody my program involved in multithread but I have no any idea about it in my program,there need two threads,and each thread has a timer when the timer is timeout

Re: multithread

2005-11-16 Thread Nickolai Dobrynin
exit_flag=TRUE; while(exit_flag==FALSE) { exit_flag=do_work(); sleep(timer_length); } g_thread_exit(anything); } Bryan yeajchao wrote: Hello everybody my program involved in multithread but I have no any idea about it in my program,there need two threads,and each thread has