Skip to content

Conversation

@jmdavis
Copy link
Member

@jmdavis jmdavis commented Feb 19, 2011

Now that we have core.time.Duration, we should probably make it so that all of our functions which take a duration of time at least have a version which take a Duration rather than just a bare number. I'm not sure if we want to push that to the point that we eventually deprecate the versions that take bare numbers, but we certainly should add versions that take a Duration. So, here's one for std.concurrency.receiveTimeout.

@kyllingstad
Copy link
Contributor

I agree. The commit looks good.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test here is a bit alembicated. What's wrong with

if (false) receiveTimeout( dur!"msecs"(10), (int x) {}, (Variant x) {} );

The code will have to compile.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wondered about that too, but then I saw that all the tests in that unittest block are written like that. I guess Sean is the one who has to answer that question.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was just copying how the other tests were written. I didn't think about it all that much. Though looking at them now, I would have written them as static asserts.

@andralex
Copy link
Member

OK, let's leave that to another day.

tsbockman pushed a commit to tsbockman/phobos that referenced this pull request Apr 7, 2016
Fix std.typecons.rtFieldDispatch() trailing whitespace.
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants