Not documented, but seems like clearstatcache() is clearing the cache only for the process it is being called from. I have 2 PHP scripts running simultaneously, and the first one does call clearstatcache(), but still the second one deadlocks, unless I call clearstatcache() in it too:
script1:
<?php
    touch('system.lock');
    ...
    unlink('system.lock');
    clearstatcache(); // should be done by unlink?
?>
script2:
<?php
    while (is_file('system.lock') {
        sleep(1);
        clearstatcache(); // without this, script 2 will deadlock forever!
    }
?>
I also found this page, which leads to the same conclusion:
https://stackoverflow.com/questions/9251237/clearstatcache-include-path-sessions