Skip to content

Conversation

@ObranS
Copy link
Contributor

@ObranS ObranS commented Dec 9, 2025

🔗 Related Links

⬅️ As Is

Multiple concurent thread Task for load(product:) cause crash

➡️ To Be

Implemented async Task cancellation to resolve a crash caused by concurrent task execution

☑️ Checklist

  • Useless comments and/or print etc are removed
  • Unit test are covered
  • Code has been deployed and tested on STG
  • ClickUp ticket status has been updated to production
  • Update CHANGELOG.md with the new changes

}
}
/// Note: No lock needed - protected by task cancellation in Virtusize.load()
internal var serverStoreProductSet: Set<VirtusizeServerProduct> = []
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can what is the value if failure? can we also declare this as weak link?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@michellequibido-virtusize VirtusizeRepository.swift is a singleton, so all properties live inside during whole app lifecycle. No need to add weak for memory management.

What about value if failure it depends. Every time a product is loaded, it will be placed to serverStoreProductSet, so either it will be empty or the product will be pre-cached by the previous request.

@ObranS ObranS merged commit 4a7aacc into trunk Dec 10, 2025
3 checks passed
@ObranS ObranS deleted the bugfix/NSDK-293-crash-fix branch December 10, 2025 17:46
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.

3 participants