mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +01:00
inetrnal/atlas: remove unnecessary (and risky) locks
This commit is contained in:
parent
3b6a080519
commit
9ee56ac320
@ -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()
|
||||||
|
Loading…
Reference in New Issue
Block a user