PHP code example of nyugodt / proc

1. Go to this page and download the library: Download nyugodt/proc library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

nyugodt / proc example snippets



$lock = \Nyugodt\Proc\FileLock::newInstance();
$lock->synchronize(function(){
  echo "This function will not be executed by two threads at the same time.\n";
  sleep(3);
  echo "Process ended!\n";
});