Home > Backend Development > PHP Tutorial > 怎么确保EXEC 单进程执行

怎么确保EXEC 单进程执行

WBOY
Release: 2016-06-13 10:13:25
Original
858 people have browsed it

如何确保EXEC 单进程执行?
我用flashpaper做了个系统,如何确保后台只有一个flashpaper在运行?谢了。

------解决方案--------------------
难道是单例模式?
------解决方案--------------------
做个文件锁?
进程去执行的时候,先去检测文件是否被锁,如果没锁,那就执行,并把文件锁上,如果锁上了,就等待。执行完毕之后,文件解锁。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template