best way to obtain a lock in php

后端 未结 10 1096
甜味超标
甜味超标 2020-12-07 15:10

I\'m trying to update a variable in APC, and will be many processes trying to do that.

APC doesn\'t provide locking functionality, so I\'m considering using other me

10条回答
  •  情歌与酒
    2020-12-07 15:15

    What I've found, actually, is that I don't need any locking at all... given what I'm trying to create is a map of all the class => path associations for autoload, it doesn't matter if one process overwrites what the other one has found (it's highly unlikely, if coded properly), because the data will get there eventually anyway. So, the solution turned out to be "no locks".

提交回复
热议问题