Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
URLEncodedForm date encoding strategy #2273
URLEncodedForm date encoding strategy #2273
Changes from 11 commits
4c6301f
a318cac
569205e
47d275c
ad50caa
4f8165f
f212661
78908d1
b9bdedb
287dff9
bbaf3e8
73617bf
2cdccb4
ab98e1e
8b96414
860d81a
70d35a6
be68616
76ef4fe
4750b51
8c99199
d5cade4
0138d63
d0fcd9a
b62257b
567f686
57144c5
2a80df9
fe655cb
914b8b7
0c173b3
bca712a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Isn't ISO8601DateFormatter thread safe itself? Making sure
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.
I wasn't sure. I found some discussion online that indicated otherwise. I can take this change back if you know or if we can confirm that
ISO8601DateFormatter
in Linux is thread safe.I had found the following issue, but it seems like it's no longer reproducible (I didn't test myself): https://bugs.swift.org/browse/SR-7745?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel
I didn't want to introduce something last minute with a threading issue.
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.
@Joannis I tried the attached project with
10000000
iterations on vapor/swift:5.2 docker image and didn't run into an issue. I will undo the multithreading.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.
Doesn't look like it's thread-unsafe to me:
https://github.com/apple/swift-corelibs-foundation/blob/master/Sources/Foundation/ISO8601DateFormatter.swift#L135-L139