bizz84 / bizz84/SwiftyStoreKit

Concurrent calls to retrieveProductsInfo cause a crash

Open
#685 1 comment 0 reactions 0 assignees View on GitHub
type: bug
Dominant language
Swift
Stars
6.7k
Forks
801
PR merge metrics
No merged PRs in 30d

Description

## Bug Report
Concurrent calls to retrieveProductsInfo cause a crash

## Platform Information
- OS: ALL
- Purchase Type: ALL
- Environment: ALL
- SwiftyStoreKit version: 0.16.1

A spinlock should be added to the inflightRequests property on write?

`
func testAppleStoreKit() {
let productIds :Set = ["productId"]
DispatchQueue.concurrentPerform(iterations: 1_000) { idx in
SwiftyStoreKit.retrieveProductsInfo(productIds) { results in
print(idx)
}
}
}
`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.