Re: Shared variable / exclusive locking?

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

 



ok, so the solution is shm or shmop, but there is something I'm not
sure about it...
the way I wanna go is shm and sem and the things that are clear are:
- use sem to block multiple processes(or threads) writing to the same shm block
- there is no need to use sem for reading since multiple
processes(threads) can read safely from the same shm block

what is not that clear is... what happens when a process reads and
another writes exactly at the same time? do the read operations behave
like some sort of transactions that ensure you get the content
available in the shm block at the beginning of the read even when it
is changed during the read? I guess this is not the case, so how would
you handle this properly?

regards

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux