I'm new to PHP, so to get started I've decided to implement a singleton.
While I am able to recreate the singleton pattern in php, but I am not sure how to implement double-checked locking.
Is that even possible/needed in PHP. I have read somewhere that PHP is not multithreaded? Can someone confirm that?
If it is multithreaded, can someone explain to me how lock() or synchronize() work in PHP?
Thanks,
Henry
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…