Mike Pomraning wrote:
> Thread::Running's threads->tojoin suggests that a class method to return all
> nondetached, nonrunning and nonjoined threads is useful.
This would be syntactical sugar for:
my @joinable = grep { $_->is_joinable() } threads->list();
However, I would rather 'enhance' the syntax for threads->list() to take
a parameter to return that kind of information:
my @joinable = threads->list(threads::joinable);
where the parameter would be defined as a 'constant' in threads.pm:
sub threads::joinable { 0 };
Similarly, we would have:
sub threads::running { 1 };
my @running = threads->list(threads::running);
Or am I making things too hard?