<commit_before><?php

/**
 * Created by PhpStorm.
 * User: Jenner
 * Date: 2015/8/19
 * Time: 14:32
 */

declare(ticks=1);
require dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';

class Producer extends \Jenner\SimpleFork\Process
{
    public function run(){
        for($i=0; $i<100; $i++){
            $this->queue->put(1, mt_rand(0, 100));
            usleep(500000);
        }
    }
}

$queue = new \Jenner\SimpleFork\IPC\SystemVMessageQueue(1, "/tmp/simple-fork-test.ipc");
$producer = new Producer();
$producer->setQueue($queue);
$producer->start();
$producer->wait();<commit_msg>fix bug<commit_after><?php

/**
 * Created by PhpStorm.
 * User: Jenner
 * Date: 2015/8/19
 * Time: 14:32
 */

declare(ticks=1);
require dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';

class Producer extends \Jenner\SimpleFork\Process
{
    public function run(){
        for($i=0; $i<100; $i++){
            $this->queue->put(1, $i);
            usleep(500000);
        }
    }
}

$queue = new \Jenner\SimpleFork\IPC\SystemVMessageQueue(1, "/tmp/simple-fork-test.ipc");
$producer = new Producer();
$producer->setQueue($queue);
$producer->start();
$producer->wait();
{'fraction_non_alphanumeric': 0.18509803921568627, 'fraction_numerical': 0.0407843137254902, 'mean_word_length': 3.5409252669039146, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5774352', 'n_tokens_mistral': 510, 'n_tokens_neox': 468, 'n_words': 81}