Parallelize singleton execution
Bug: 281536768
Test: manual, presubmits
Change-Id: I57fdc76ba6b277e88e196b506af87127a530fd37
diff --git a/snapshot/host_fake_snapshot.go b/snapshot/host_fake_snapshot.go
index b04657d..c4cfbb5 100644
--- a/snapshot/host_fake_snapshot.go
+++ b/snapshot/host_fake_snapshot.go
@@ -75,7 +75,7 @@
}
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 ac002be..8ff59cb 100644
--- a/snapshot/recovery_snapshot.go
+++ b/snapshot/recovery_snapshot.go
@@ -68,7 +68,7 @@
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 8f7b8c2..4484c85 100644
--- a/snapshot/vendor_snapshot.go
+++ b/snapshot/vendor_snapshot.go
@@ -78,8 +78,8 @@
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) {