@@ -1641,9 +1641,6 @@ initHold (SomeHoldInit h) = void $ getHoldEventSubscription h
16411641-- | Run an event action outside of a frame
16421642runFrame :: forall x a. EventM x a -> SpiderHost x a --TODO: This function also needs to hold the mutex
16431643runFrame a = SpiderHost $ ask >>= \spiderTimeline -> lift $ do
1644− -- Clear out pending unsubscriptions; these will need to happen eventually anyway, and might cause us a lot of extra work during the frame, so get rid of them now
1645− pendingCleanups <- atomicModifyIORef (_spiderTimeline_cleanups spiderTimeline) $ \x -> ([], x)
1646− {-# SCC "cleanups" #-} sequence_ pendingCleanups
16471644 toAssignRef <- newIORef [] -- This should only actually get used when events are firing
16481645 holdInitRef <- newIORef []
16491646 mergeUpdateRef <- newIORef []
@@ -1818,9 +1815,7 @@ globalSpiderTimeline = unsafePerformIO unsafeNewSpiderTimeline
18181815-- | Stores all global data relevant to a particular Spider timeline; only one
18191816-- value should exist for each type @x@
18201817data SpiderTimeline x = SpiderTimeline
1821− { _spiderTimeline_toUnsubscribe :: !(IORef [EventSubscription x])
1822− , _spiderTimeline_lock :: !(MVar ())
1823− , _spiderTimeline_cleanups :: !(IORef [IO ()])
1818+ { _spiderTimeline_lock :: !(MVar ())
18241819#ifdef DEBUG
18251820 , _spiderTimeline_depth :: !(IORef Int)
18261821#endif
@@ -1834,16 +1829,12 @@ instance GEq SpiderTimeline where
18341829
18351830unsafeNewSpiderTimeline :: forall x. IO (SpiderTimeline x)
18361831unsafeNewSpiderTimeline = do
1837− toUnsubscribe <- newIORef []
18381832 lock <- newMVar ()
1839− cleanups <- newIORef []
18401833#ifdef DEBUG
18411834 depthRef <- newIORef 0
18421835#endif
18431836 return $ SpiderTimeline
1844− { _spiderTimeline_toUnsubscribe = toUnsubscribe
1845− , _spiderTimeline_lock = lock
1846− , _spiderTimeline_cleanups = cleanups
1837+ { _spiderTimeline_lock = lock
18471838#ifdef DEBUG
18481839 , _spiderTimeline_depth = depthRef
18491840#endif