Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.hyper/.race parameters sanity check #5008

Closed
p6rt opened this issue Jan 6, 2016 · 5 comments
Closed

.hyper/.race parameters sanity check #5008

p6rt opened this issue Jan 6, 2016 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Jan 6, 2016

Migrated from rt.perl.org#127191 (status was 'resolved')

Searchable as RT127191$

@p6rt
Copy link
Author

p6rt commented Jan 6, 2016

From jkramer@nex.scrapping.cc

Currently it's possible to call .race and .hyper with degree => 0, which causes the program to freeze, probably because it's waiting for the 0 threads to do work. I propose adding a simple sanity check and throw some meaningful error when the parameter doesn't make any sense (degree < 1), as I can't think of a situation where a user might want this.

The same is true for the batch parameter, which currently accepts values < 1 without complaining and makes the program freeze.

my @​xs = ^10 .hyper(batch => 0).map​: * + 1;

my @​xs = ^10 .hyper(degree => 0).map​: * + 1;

@p6rt
Copy link
Author

p6rt commented Jan 6, 2016

From @lizmat

On 06 Jan 2016, at 16​:29, Jonas Kramer (via RT) <perl6-bugs-followup@​perl.org> wrote​:

# New Ticket Created by Jonas Kramer
# Please include the string​: [perl #​127191]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=127191 >

Currently it's possible to call .race and .hyper with degree => 0, which causes the program to freeze, probably because it's waiting for the 0 threads to do work. I propose adding a simple sanity check and throw some meaningful error when the parameter doesn't make any sense (degree < 1), as I can't think of a situation where a user might want this.

The same is true for the batch parameter, which currently accepts values < 1 without complaining and makes the program freeze.

my @​xs = ^10 .hyper(batch => 0).map​: * + 1;

my @​xs = ^10 .hyper(degree => 0).map​: * + 1;

Fixed with 70640bf , tests added with 4a59ba3 , can be closed

Liz

@p6rt
Copy link
Author

p6rt commented Jan 6, 2016

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Jan 9, 2016

From @usev6

On Wed Jan 06 13​:51​:56 2016, elizabeth wrote​:
[...]

Fixed with 70640bf , tests added with 4a59ba3 , can be closed

Thanks! I'm closing this ticket as 'resolved'.

@p6rt
Copy link
Author

p6rt commented Jan 9, 2016

@usev6 - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Jan 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant