swagger-api / swagger-api/swagger-codegen
[swift4] managerStore is not threadsafe
Open
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
// Create a new manager for each request to customize its request header
managerStore[managerId] = manager
We use our own manager to add some authentication headers and the managerStore will just cause random crashes when using a concurrent background queue.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Swift 4 generated-client implementation and every use of managerStore. Reproduce the random crashes with concurrent background requests, then verify that manager creation and request handling no longer fail under concurrency.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100