A
Angus
Hello
I am having a problem with access to a shared std::list. The list is
accessed via different threads and I use a mutex lock/unlock to ensure
that only one process can work on the list at any one time. The
trouble is the lock and unlock is scattered through the code. I am
having problems where I do a lock but there is no unlock and the code
gets stuck. It is quite tricky to debug of course.
Does anyone have any tips on how to handle this problem. Should I use
some global/singleton accessor function to access the list? But I do
need to perhaps edit/delete/add to the list. so how best to handle?
Angus
I am having a problem with access to a shared std::list. The list is
accessed via different threads and I use a mutex lock/unlock to ensure
that only one process can work on the list at any one time. The
trouble is the lock and unlock is scattered through the code. I am
having problems where I do a lock but there is no unlock and the code
gets stuck. It is quite tricky to debug of course.
Does anyone have any tips on how to handle this problem. Should I use
some global/singleton accessor function to access the list? But I do
need to perhaps edit/delete/add to the list. so how best to handle?
Angus