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

std.net.curl: Move asynchronous stuff to lazily-instantiated namespace #6122

Merged
merged 1 commit into from Feb 4, 2018

Conversation

@CyberShadow
Copy link
Member

@CyberShadow CyberShadow commented Feb 4, 2018

Allows avoiding importing std.concurrency unless asynchronous functionality actually needed.
Improves impact on import time by about 15%.

#5916 (comment)

@dlang-bot
Copy link
Contributor

@dlang-bot dlang-bot commented Feb 4, 2018

Thanks for your pull request, @CyberShadow!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Copy link
Member

@wilzbach wilzbach left a comment

Nice! Do you prefer the static: attribute label or the static attribute directly on the function?

@@ -1612,7 +1584,7 @@ private static struct AsyncLineInputRange(Char)
*
* If no data is available and the main thread accesses the range it will block
* until data becomes available. An exception to this is the $(D wait(Duration)) method on
* the $(LREF AsyncLineInputRange). This method will wait at maximum for the
* the $(LREF LineInputRange). This method will wait at maximum for the

This comment has been minimized.

// @@@@BUG 15831@@@@
// this should be inside byLineAsync
// Range that reads one chunk at a time asynchronously.
private static struct ChunkInputRange

This comment has been minimized.

@wilzbach

wilzbach Feb 4, 2018
Member

static is redundant here.

This comment has been minimized.

@CyberShadow

CyberShadow Feb 4, 2018
Author Member

This one is safe to remove; not sure about the rest at a glance, since static can have additional effects on templates.

This comment has been minimized.

@CyberShadow

CyberShadow Feb 4, 2018
Author Member

Err actually there were two more non-templated functions.

@CyberShadow CyberShadow force-pushed the CyberShadow:std-net-curl-async-ns branch from 5a4749d to 89bf93d Feb 4, 2018
Allows avoiding importing std.concurrency unless asynchronous
functionality actually needed. Improves impact on import time by about
15%.
@CyberShadow CyberShadow force-pushed the CyberShadow:std-net-curl-async-ns branch from 89bf93d to d60fcf6 Feb 4, 2018
@wilzbach wilzbach merged commit efe5e8f into dlang:master Feb 4, 2018
7 checks passed
7 checks passed
CyberShadow/DAutoTest Documentation OK (7 additions, 7 deletions)
Details
auto-tester Pass: 10
Details
ci/circleci Your tests passed on CircleCI!
Details
codecov/changes No unexpected coverage changes found.
Details
codecov/patch 74.038% of diff hit (target 90.369%)
Details
codecov/project 90.369% remains the same compared to 3a9a8b8
Details
continuous-integration/jenkins/pr-merge This commit looks good
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.