Click here to Skip to main content
15,919,500 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralThread Safe Linked List Pin
Member 3413714-Sep-04 3:12
Member 3413714-Sep-04 3:12 
GeneralRe: Thread Safe Linked List Pin
Alexander M.,14-Sep-04 3:27
Alexander M.,14-Sep-04 3:27 
GeneralRe: Thread Safe Linked List Pin
16-Sep-04 0:51
suss16-Sep-04 0:51 
GeneralRe: Thread Safe Linked List Pin
Joaquín M López Muñoz14-Sep-04 3:33
Joaquín M López Muñoz14-Sep-04 3:33 
GeneralRe: Thread Safe Linked List Pin
Laing,James14-Sep-04 10:42
Laing,James14-Sep-04 10:42 
GeneralRe: Thread Safe Linked List Pin
Joaquín M López Muñoz14-Sep-04 10:59
Joaquín M López Muñoz14-Sep-04 10:59 
GeneralRe: Thread Safe Linked List Pin
Laing,James14-Sep-04 11:18
Laing,James14-Sep-04 11:18 
GeneralRe: Thread Safe Linked List Pin
Joaquín M López Muñoz14-Sep-04 11:30
Joaquín M López Muñoz14-Sep-04 11:30 
I'm still not getting you. AFAIK the only way to set a Win32 mutex is by waiting on it; releasing is done via ReleaseMutex. So your proposal is that the update function properly waits for the mutex and releases it after updating is completed, right? So, what should the access (i.e. read-only) function do?
  • if the access function also waits for the object, then there cannot be more than one thread either updating or reading at a time, exactly the same way as it happens with using a CRITICAL_SECTION.
  • if the access function does not wait for the mutex, the list is not thread safe, as when the update method enters there could be other threads performing read-only acess at that time, and corruption of the data structure can hence ensue.
Maybe I am not getting your proposal right Confused | :confused:

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
GeneralRe: Thread Safe Linked List Pin
Laing,James14-Sep-04 11:56
Laing,James14-Sep-04 11:56 
GeneralI almost understand, a little more advicie please. Pin
mcgahanfl14-Sep-04 2:47
mcgahanfl14-Sep-04 2:47 
GeneralRe: I almost understand, a little more advicie please. Pin
Hardy_Smith14-Sep-04 4:52
Hardy_Smith14-Sep-04 4:52 
GeneralRe: I almost understand, a little more advicie please. Pin
Emilio Garavaglia14-Sep-04 4:55
Emilio Garavaglia14-Sep-04 4:55 
GeneralRe: I almost understand, a little more advicie please. Pin
mcgahanfl14-Sep-04 6:13
mcgahanfl14-Sep-04 6:13 
GeneralViews in full-screen Pin
Jens Christiansen14-Sep-04 2:35
Jens Christiansen14-Sep-04 2:35 
GeneralActiveX problem Pin
archetype14-Sep-04 1:35
archetype14-Sep-04 1:35 
Generalcharts Pin
dana_krycek14-Sep-04 1:34
dana_krycek14-Sep-04 1:34 
GeneralAdding events to a std C++ class Pin
Alistair Lacy14-Sep-04 1:28
Alistair Lacy14-Sep-04 1:28 
GeneralRe: Adding events to a std C++ class Pin
Emilio Garavaglia14-Sep-04 2:55
Emilio Garavaglia14-Sep-04 2:55 
GeneralRe: Adding events to a std C++ class Pin
Alistair Lacy15-Sep-04 3:43
Alistair Lacy15-Sep-04 3:43 
GeneralAccessing any process's memory Pin
Member 136563313-Sep-04 23:26
Member 136563313-Sep-04 23:26 
GeneralRe: Accessing any process's memory Pin
Arsalan Malik13-Sep-04 23:40
Arsalan Malik13-Sep-04 23:40 
GeneralC++ Pin
Member 135729713-Sep-04 23:26
Member 135729713-Sep-04 23:26 
GeneralRe: C++ Pin
David Crow14-Sep-04 2:53
David Crow14-Sep-04 2:53 
GeneralVisual Studio .NET 2003 Add-Ins Pin
Franz Klein13-Sep-04 22:45
Franz Klein13-Sep-04 22:45 
GeneralRe: Visual Studio .NET 2003 Add-Ins Pin
Andrew Walker14-Sep-04 13:47
Andrew Walker14-Sep-04 13:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.