Skip to content

Commit

Permalink
Update package
Browse files Browse the repository at this point in the history
  • Loading branch information
vmanot committed Apr 22, 2024
1 parent 5b9dd63 commit 6e8be30
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Sources/Lite/Intramodular/Lite.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public final class Lite: _CancellablesProviding, Logging, ObservableObject {

public var services: [any _MIService] {
get async throws {
if await autoinitializedServices == nil {
await self.queue.perform {
await _populateAutoinitializedServicesIfNecessary()
}

Expand Down Expand Up @@ -91,7 +91,7 @@ public final class Lite: _CancellablesProviding, Logging, ObservableObject {
}
}

Task {
queue.addTask(priority: .userInitiated) {
await _runSetUp()
}

Expand Down Expand Up @@ -144,8 +144,12 @@ extension Lite {

self.logger.debug("Discovering services to auto-intialize.")

var services: [any _MIService] = []

do {
self.autoinitializedServices = try await self._makeServices()
services = try await self._makeServices()

self.autoinitializedServices = services
} catch {
runtimeIssue(error)

Expand Down

0 comments on commit 6e8be30

Please sign in to comment.