Article View: comp.os.os2.programmer
Article #3470C++ and Threads
From: Robert Mahoney
Date: Fri, 08 Jan 1993 22:14
Date: Fri, 08 Jan 1993 22:14
23 lines
1253 bytes
1253 bytes
MP>same globel data. I will have about 300 different lists MP>that I will have to protect. The idea thing is to let as MP>many threads read as they like, but only let the lists be MP>update by one thread at a time. Which means that I will MP>have to make sure no one is looking at the list when this MP>is done. So, the only way to do it is to use 2 semephores. MP> So now I am using at least 600 sems just for the lists. I'm sure there is a better way, but all you need is 1 event semaphore per list. If the semaphore is posted then any thread that wants to access the list can do a DosWaitEventSem until it is reset. MP>There are RAM semephore in OS/2 2.0? I thought RAM MP>semephore were taking out? Only 32bit semaphores in OS/2 v2.0 are Event Mutex and MuxWait. But I do believe a 32bit program can get access to 16 bit semaphores. Bob ___ X MR/2 1.36 #10 X Windows NT: It can talk the talk but can it walk the walk?
Technical Details
Message-ID:
<726868819.AA00000@blkcat.UUCP>Path:
arc1-ca.pugleaf.net!sparky!uunet!blkcat!UucpShow Full Headers
Complete Article Headers
From: Robert.Mahoney@f347.n109.z1.fidonet.org (Robert Mahoney) Sender: Uucp@blkcat.UUCP Path: arc1-ca.pugleaf.net!sparky!uunet!blkcat!Uucp Newsgroups: comp.os.os2.programmer Subject: C++ and Threads Message-ID: <726868819.AA00000@blkcat.UUCP> Date: Fri, 08 Jan 1993 17:14:00 -0500 Lines: 24