-
-
Notifications
You must be signed in to change notification settings - Fork 739
std.net.curl: Move asynchronous stuff to lazily-instantiated namespace #6122
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
Conversation
Thanks for your pull request, @CyberShadow! Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
std/net/curl.d
Outdated
// @@@@BUG 15831@@@@ | ||
// this should be inside byLineAsync | ||
// Range that reads one chunk at a time asynchronously. | ||
private static struct ChunkInputRange |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
static
is redundant here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one is safe to remove; not sure about the rest at a glance, since static
can have additional effects on templates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Err actually there were two more non-templated functions.
5a4749d
to
89bf93d
Compare
Allows avoiding importing std.concurrency unless asynchronous functionality actually needed. Improves impact on import time by about 15%.
89bf93d
to
d60fcf6
Compare
Allows avoiding importing std.concurrency unless asynchronous functionality actually needed.
Improves impact on import time by about 15%.
#5916 (comment)