php - Stop multiple sessions accessing the same file simultaneously -


The GD library is accessing it, while it is possible to lock a file to prevent it being opened?

What I am trying to achieve is similar to the isolation of a 'serializbol' level ... I want to ensure that only one session / user has an image 'dirty' at a time Read '

For example

The large image is empty

  • Secrets & amp; Janet has uploaded her images
  • Big image opens in the session of the Raj.
  • 1 ms later the big image opens in Janet's session.
  • Season's session connects her image and saves her big image
  • After 1 mile, Janet's session connects her image and saves her version of bigger image.
  • The resulting image of the image is not in the final image because the version of the Janet overwrote it.
  • I hope this clarifies enough.

    check-out. You can either lock the file on which you are working, or create a "lock file" elsewhere in the file system, which checks all your scripts.


    Comments

    Popular posts from this blog

    windows - Heroku throws SQLITE3 Read only exception -

    lex - Building a lexical Analyzer in Java -

    python - rename keys in a dictionary -