Why AmbientUnitOfWork and UnitOfWorkManager are Singleton #12238
-
I try to read source code recently, I fond that "AmbientUnitOfWork" and "UnitOfWorkManager" are Singletons (implement ISingletonDependency), assume all request use the default reservation name is "_AbpActionUnitOfWork", then does that means all the request will use ChildUnitOfWork instance with the same one parent UnitOfWork instance? If so, I see the method CompleteAsync in ChildUnitOfWork just do nothing (return Task.CompletedTask), that really confused me, does anyone know how it works? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
hi AsyncLocal is used internally, so there are no conflicts, and since you've looked at the source, I suggest you keep looking at it. |
Beta Was this translation helpful? Give feedback.
hi
AsyncLocal is used internally, so there are no conflicts, and since you've looked at the source, I suggest you keep looking at it.