I come from the world of C ++.
And recently, I started using Apache Thrift, an RPC infrastructure. I am writing client PHP code and Python server code.
When I read the PHP implementation, I find the following:
class TStringFuncFactory {
private static $_instance;
public static function create() {
if(!self::$_instance) {
self::_setInstance();
}
return self::$_instance;
}
....
}
These are single WITHOUT locks.
Question
What is a PHP processing template? Does this guarantee that it will not have a risk condition.
source
share