inetrnal/atlas: remove unnecessary (and risky) locks

This commit is contained in:
Hajime Hoshi 2022-06-08 10:05:15 +09:00
parent 3b6a080519
commit 9ee56ac320

View File

@ -42,9 +42,6 @@ func NewShader(ir *shaderir.Program) *Shader {
// A function from finalizer must not be blocked, but disposing operation can be blocked. // A function from finalizer must not be blocked, but disposing operation can be blocked.
// Defer this operation until it becomes safe. (#913) // Defer this operation until it becomes safe. (#913)
func (s *Shader) MarkDisposed() { func (s *Shader) MarkDisposed() {
backendsM.Lock()
defer backendsM.Unlock()
deferredM.Lock() deferredM.Lock()
deferred = append(deferred, func() { deferred = append(deferred, func() {
s.dispose() s.dispose()