From 0c10e4dcc027e341655e8eedc20bd77f9539a22b Mon Sep 17 00:00:00 2001 From: LaMont Jones Date: Tue, 16 May 2023 00:58:37 +0000 Subject: Parallelize singleton execution Bug: 281536768 Test: manual, presubmits Change-Id: I57fdc76ba6b277e88e196b506af87127a530fd37 --- snapshot/host_fake_snapshot.go | 2 +- snapshot/recovery_snapshot.go | 2 +- snapshot/vendor_snapshot.go | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'snapshot') diff --git a/snapshot/host_fake_snapshot.go b/snapshot/host_fake_snapshot.go index b04657d3d..c4cfbb5ce 100644 --- a/snapshot/host_fake_snapshot.go +++ b/snapshot/host_fake_snapshot.go @@ -75,7 +75,7 @@ type hostSnapshotFakeJsonFlags struct { } func registerHostSnapshotComponents(ctx android.RegistrationContext) { - ctx.RegisterSingletonType("host-fake-snapshot", HostToolsFakeAndroidSingleton) + ctx.RegisterParallelSingletonType("host-fake-snapshot", HostToolsFakeAndroidSingleton) } type hostFakeSingleton struct { diff --git a/snapshot/recovery_snapshot.go b/snapshot/recovery_snapshot.go index ac002be9c..8ff59cbcf 100644 --- a/snapshot/recovery_snapshot.go +++ b/snapshot/recovery_snapshot.go @@ -68,7 +68,7 @@ var RecoverySnapshotImageName = "recovery" type RecoverySnapshotImage struct{} func (RecoverySnapshotImage) Init(ctx android.RegistrationContext) { - ctx.RegisterSingletonType("recovery-snapshot", RecoverySnapshotSingleton) + ctx.RegisterParallelSingletonType("recovery-snapshot", RecoverySnapshotSingleton) } func (RecoverySnapshotImage) RegisterAdditionalModule(ctx android.RegistrationContext, name string, factory android.ModuleFactory) { diff --git a/snapshot/vendor_snapshot.go b/snapshot/vendor_snapshot.go index 8f7b8c215..4484c855d 100644 --- a/snapshot/vendor_snapshot.go +++ b/snapshot/vendor_snapshot.go @@ -78,8 +78,8 @@ var VendorSnapshotImageName = "vendor" type VendorSnapshotImage struct{} func (VendorSnapshotImage) Init(ctx android.RegistrationContext) { - ctx.RegisterSingletonType("vendor-snapshot", VendorSnapshotSingleton) - ctx.RegisterSingletonType("vendor-fake-snapshot", VendorFakeSnapshotSingleton) + ctx.RegisterParallelSingletonType("vendor-snapshot", VendorSnapshotSingleton) + ctx.RegisterParallelSingletonType("vendor-fake-snapshot", VendorFakeSnapshotSingleton) } func (VendorSnapshotImage) RegisterAdditionalModule(ctx android.RegistrationContext, name string, factory android.ModuleFactory) { -- cgit v1.2.3-59-g8ed1b