Skip to content

[Objective-C] Thread safety fix for Object class#9598

Open
michalcichon wants to merge 5 commits intoswagger-api:masterfrom
michalcichon:thread-safety
Open

[Objective-C] Thread safety fix for Object class#9598
michalcichon wants to merge 5 commits intoswagger-api:masterfrom
michalcichon:thread-safety

Conversation

@michalcichon
Copy link

@michalcichon michalcichon commented Jul 25, 2019

Synchronizing on [self class] makes several critical sections across all inheriting classes with one shared NSDictionary object (classNames). I believe it wasn't the intention of the author of this fix (based on a JSONModel issue ticket). To make one critical section we need one static object (lock).

PR checklist

  • Read the contribution guidelines.
  • Ran the shell script under ./bin/ to update Petstore sample so that CIs can verify the change. (For instance, only need to run ./bin/{LANG}-petstore.sh and ./bin/security/{LANG}-petstore.sh if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in .\bin\windows\.
  • Filed the PR against the correct branch: 3.0.0 branch for changes related to OpenAPI spec 3.0. Default: master.
  • Not applicable. There is no technical committee for Objective-C Copied the technical committee to review the pull request if your PR is targeting a particular programming language.

Description of the PR

Synchronizing on [self class] makes several critical sections across all inheriting classes with one shared NSDictionary object (classNames). I believe it wasn't the intention of the author of this fix (based on a JSONModel issue ticket). To make one critical section we need one static object (lock).

Synchronizing on [self class] makes several critical sections across all inheriting classes with one shared NSDictionary object (classNames). I believe it wasn't the intention of the author of this fix (based on a JSONModel issue ticket). To make one critical section we need one static object (lock).
@michalcichon
Copy link
Author

Unfortunately there is no technical committee for Objective-C. 😞

@webron
Copy link
Contributor

webron commented Jul 25, 2019

@michalcichon - do you want to be in one? :)

@michalcichon
Copy link
Author

Hey @webron! I haven't got 3 PRs merged, so I'm afraid I'm not eligible. 😉 My concern was about who's gonna review my pull request. But if you like you can add me as an "interim" member of the technical committee just in case if someone has the same problem as I have.

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.

2 participants