Skip to content

Commit 03807db

Browse files
deinit: abort queued art requests before blocking I/O
1 parent 4c326bd commit 03807db

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/opl.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1774,6 +1774,12 @@ static void moduleCleanup(opl_io_module_t *mod, int exception, int modeSelected)
17741774

17751775
void deinit(int exception, int modeSelected)
17761776
{
1777+
/* Cut launch/exit latency by stopping queued art I/O before globally
1778+
* blocking the I/O worker. This avoids waiting for stale cover requests
1779+
* that are no longer needed once we are deinitializing. */
1780+
cacheAbortMmceImageLoadsTimed(0);
1781+
(void)cacheCancelPendingImageLoadsTimed(0);
1782+
17771783
// block all io ops, wait for the ones still running to finish
17781784
ioBlockOps(1);
17791785
guiExecDeferredOps();

0 commit comments

Comments
 (0)