You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sinject::Container#get has no critical sections, meaning that requesting a singleton dependency is not guaranteed to return the same object each time. Though unlikely in practice, timing issues may result in the generation of multiple instances of a supposed singleton.
Sinject::Container#get
has no critical sections, meaning that requesting a singleton dependency is not guaranteed to return the same object each time. Though unlikely in practice, timing issues may result in the generation of multiple instances of a supposed singleton.Steps to reproduce:
(A contrived example, admittedly.)
Expected:
objects.size
is 1.Actual:
objects.size
is greater than 1, the exact number being subject to the timing of the threads' execution.Where
objects.size
is less than the number of threads spawned, this shows that eventually#get
does return the same instance each time.The text was updated successfully, but these errors were encountered: