Mutex or atomic operations for multithread app?

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 to
int variables using g_atomic* functions instead using mutex? Is it a good
solution or it may occur memory access problems?

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