-
Notifications
You must be signed in to change notification settings - Fork 228
Make the Logger thread-safe to avoid crashes #2775
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
martinmitrevski
left a comment
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.
Looks good, just few comments about the thread safety mechanism
martinmitrevski
left a comment
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.
One of the queues is still serial
| func test_log_isThreadSafe() { | ||
| LogConfig.destinationTypes = [ConsoleLogDestination.self] | ||
|
|
||
| DispatchQueue.concurrentPerform(iterations: 100) { _ in |
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.
Without your changes, are those tests failing?
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.
Yes 👍
martinmitrevski
left a comment
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.
lgtm ✅
|
Kudos, SonarCloud Quality Gate passed! |








🔗 Issue Links
Related to https://github.com/GetStream/ios-issues-tracking/issues/270
Resolves https://github.com/GetStream/ios-issues-tracking/issues/555
🎯 Goal
Fix crashes related to the Logger not being Thread-safe.
🧪 Manual Testing Notes
N/A
☑️ Contributor Checklist