Skip to content

Commit

Permalink
Remove "Release called but is already destroyed" message
Browse files Browse the repository at this point in the history
  • Loading branch information
queezle42 committed Aug 10, 2024
1 parent f2bee23 commit 99feba0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions quasar-wayland/src/Quasar/Wayland/Client/Surface.hs
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,13 @@ releaseClientBuffer clientBuffer = do
-- TODO do we need to handle the disposer future?
disposeEventually_ lockDisposer
traceM "ClientBuffer: released"
Released -> traceM "ClientBuffer: Duplicate release"
Destroyed -> traceM "ClientBuffer: Release called but is already destroyed"
Released ->
-- This should never happen: When a buffer is attached to multiple
-- surfaces at the same time, the release event has a race condition.
-- Therefore we only attach the buffer to once surface at at time so we
-- should never see more than one release event.
traceM "ClientBuffer released more than once"
Destroyed -> pure ()

destroyClientBuffer :: ClientBuffer b -> STMc NoRetry '[] ()
destroyClientBuffer clientBuffer = do
Expand Down

0 comments on commit 99feba0

Please sign in to comment.