Commit Graph
7 Commits
Author SHA1 Message Date
NachoSoto a94e00d572 CallbackCache: fixed reference (#2143)
This was a conflict between #2136 and #2137.
2022-12-13 09:37:30 -08:00
NachoSoto 4105d66a9e CallbackCache: avoid exposing internal mutable cache (#2136)
Small refactor to avoid users of this `class` change the content of the
cache without using the methods.
2022-12-13 08:25:11 -08:00
NachoSoto 8a84ffb867 CallbackCache: added assertion for tests to ensure we don't leak callbacks (#2137)
See also #2135.
I'm looking into the leak in #2105, and I have a theory that it's due to
callbacks being stored in this cache, but sometimes not being dequeued,
so leaking all references in them.

This assertion will only run in RC tests, and will ensure that this
doesn't happen.
2022-12-13 08:24:55 -08:00
NachoSoto b08fb7dc08 Renamed CallbackCache.add(callback:) (#1970)
This is the Swifty way to avoid the duplication in `cache.add(callback: callback)`.
2022-10-11 12:47:17 -07:00
NachoSoto 406522097e CallbackCache: Sendable conformance (#1835)
The change in #1834 made this possible because the type is now immutable.
2022-08-15 15:12:11 -07:00
NachoSoto 0f99e94836 CallbackCache: simplified implementation using Atomic (#1834)
We don't actually need to share a single queue to synchronize all the callback caches.
This new implementation also avoids using the risky `DispatchQueue.sync`.

This also fixes potential issues because `cachedCallbacksByKey` was exposed, and it could have been read without synchronizing access with the queue. This is now impossible.
2022-08-15 15:10:50 -07:00
aboedo f5697de730 renamed Purchases folder to Sources (#1416)
* renamed `Purchases` folder to `Sources`

* temporarily enabling installation test jobs

* re-disabling installation test jobs
2022-03-28 11:53:24 -03:00