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

怎么确保EXEC 单进程执行

WBOY
WBOYOriginal
2016-06-13 13:43:301026browse

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

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

Statement:
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