Unsolved QSharedMemory access without lock()?
-
Can QSharedMemory be accessed by two or more processes simultaneously without calling lock(), as long as they respect write boundaries of the memory e.g. Allocated memory is 30KB, 1st process writes in 0-10KB, 2nd in 10-20KB, 3rd in 20-30KB? Same with read i.e. that they don't read an area while other is writing to it?
-
According to the documentation it's a simple semaphore so yes.
-
It should be safe on windows, not sure about how it's implemented on osx/linux - not really familiar with osx/linux shared memory api's either. That's why wondering whether osx api uses some underlying locking api?
-
@Taytoo said in QSharedMemory access without lock()?:
That's why wondering whether osx api uses some underlying locking api?
Look at the code, it's opensource.