-
Robert Fletcher authored
Fixes #50774 When the server boots up, 2 threads hit the same `UnboundTemplate` instance before it has set up `@templates`. Both threads get past the `unless template = @templates[locals]` check because `@templates[locals]` isn't set yet. However, with `@write_lock`, one thread waits while the other one proceeds, setting `@templates` to a frozen hash. The second thread then gets the write lock and tries to modify `@templates` but it has been frozen.
Robert Fletcher authoredFixes #50774 When the server boots up, 2 threads hit the same `UnboundTemplate` instance before it has set up `@templates`. Both threads get past the `unless template = @templates[locals]` check because `@templates[locals]` isn't set yet. However, with `@write_lock`, one thread waits while the other one proceeds, setting `@templates` to a frozen hash. The second thread then gets the write lock and tries to modify `@templates` but it has been frozen.
Loading