Skip to content

Commit 9021c78

Browse files
committed
Clear the queue in a different task
1 parent 194ee54 commit 9021c78

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sentry/src/main/java/io/sentry/SentryExecutorService.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,10 @@ public void prewarm() {
129129
for (int i = 0; i < INITIAL_QUEUE_SIZE; i++) {
130130
executorService.schedule(dummyRunnable, Long.MAX_VALUE, TimeUnit.DAYS);
131131
}
132-
executorService.getQueue().clear();
133132
});
133+
executorService.submit(() -> {
134+
executorService.getQueue().clear();
135+
});
134136
}
135137

136138
private static final class SentryExecutorServiceThreadFactory implements ThreadFactory {

0 commit comments

Comments
 (0)