j2innet
Pages
Home
How To Buy
iPhone Can Do
iPhone Lobang
iPhone Youtube
iPhone Shout
iPhone FAQ
About Me
iPhone Accessories
iPad Accessories
Sunday, June 28, 2009
Synchronization of multiple reader and writer processes using Mutex
void CServer::WriteToMemory()
{
mutex.Lock();
switch memory page
...
...
write something
...
...
mutex.Unlock();
}
void CServer::ReadFromMemory()
{
mutex.Lock();
get last writen memory page
mutex.Unlock();
...
...
read something
...
...
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment