<commit_before>package Sidef::Types::Block::Fork {

    use 5.014;

    sub new {
        my (undef, %opts) = @_;
        bless \%opts, __PACKAGE__;
    }

    sub get {
        my ($self) = @_;

        exists($self->{result})
          or return;

        # Wait for the process to finish
        waitpid($self->{pid}, 0);

        my $ref = do($self->{result});
        unlink(delete $self->{result});
        $ref;
    }

    *wait = \&get;
    *join = \&get;
};

1<commit_msg>Added the Fork.kill() method;<commit_after>package Sidef::Types::Block::Fork {

    use 5.014;

    sub new {
        my (undef, %opts) = @_;
        bless \%opts, __PACKAGE__;
    }

    sub get {
        my ($self) = @_;

        exists($self->{result})
          or return;

        # Wait for the process to finish
        waitpid($self->{pid}, 0);

        my $ref = do($self->{result});
        unlink(delete $self->{result});
        $ref;
    }

    *wait = \&get;
    *join = \&get;

    sub kill {
        my ($self, $signal) = @_;
        kill(defined($signal) ? $signal->get_value : 'KILL', $self->{pid});
    }
};

1
{'fraction_non_alphanumeric': 0.17927927927927928, 'fraction_numerical': 0.010810810810810811, 'mean_word_length': 1.770573566084788, 'pattern_counts': {'":': 0, '<': 3, '<?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': '2203467', 'n_tokens_mistral': 404, 'n_tokens_neox': 379, 'n_words': 87}