Skip to content

Commit

Permalink
Set Zipline's cacheDispatcher (#2187)
Browse files Browse the repository at this point in the history
The cache is shared by multiple apps and so can't use the app's
dispatchers.
  • Loading branch information
squarejesse authored Jul 16, 2024
1 parent 992fd4e commit 0e4e536
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ internal class RealTreehouseApp<A : AppService> private constructor(
* Continuously polls for updated code, and emits a new [LoadResult] instance when new code is
* found.
*/
@OptIn(ExperimentalCoroutinesApi::class) // CloseableCoroutineDispatcher is experimental.
private fun ziplineFlow(
eventListenerFactory: EventListener.Factory,
): Flow<LoadResult> {
Expand All @@ -123,8 +124,7 @@ internal class RealTreehouseApp<A : AppService> private constructor(
if (!spec.loadCodeFromNetworkOnly) {
loader = loader.withCache(
cache = factory.cache.value,
// TODO(jwilson): use this once we update Zipline.
// cacheDispatcher = factory.ziplineLoaderDispatcher,
cacheDispatcher = factory.ziplineLoaderDispatcher,
)

if (factory.embeddedFileSystem != null && factory.embeddedDir != null) {
Expand Down

0 comments on commit 0e4e536

Please sign in to comment.