hoaproject / Central

Hoa is a modular, extensible, and structured set of PHP libraries.
https://hoa-project.net/
Other
104 stars 8 forks source link

Add condition for deleted file #2

Closed Metalaka closed 10 years ago

Metalaka commented 10 years ago

Not throw RuntimeException: SplFileInfo::getMTime(): stat failed When the file was already deleted by another parallel process.

@src: http://framework.zend.com/issues/browse/ZF-11858 I belive that this error occurs only under some load, when two (or more) process fire at the same time. One process tries to run SplFileInfo::getMTime() on file wich was already deleted by other parallel process. Solution for this could be some kind of semaphore or at least an additional file_exists() check.

Hywan commented 10 years ago

Hello :-),

Would not be better to patch Hoa\File\SplFileInfo directly?

Thank you for the PR! And sorry for the late reply, we are under a huge migration!

Hywan commented 10 years ago

Also, can you PR Hoa\File instread of Central (which is in read-only)?