mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IJPL-160390 Collect only latest status from TaskSuspender
We don't really need to process old statuses when new one is received GitOrigin-RevId: 8ce8f434b4701261b01ef1c8fdc5fa095f69ccab
This commit is contained in:
committed by
intellij-monorepo-bot
parent
b233586c38
commit
e77ad3acff
+1
-1
@@ -161,7 +161,7 @@ class PlatformTaskSupport(private val cs: CoroutineScope) : TaskSupport {
|
||||
val entityId = taskInfo.eid
|
||||
|
||||
launch {
|
||||
taskSuspender?.state?.collect { state ->
|
||||
taskSuspender?.state?.collectLatest { state ->
|
||||
LOG.trace { "Task suspender state changed to $state, entityId=$entityId, title=$title" }
|
||||
when (state) {
|
||||
TaskSuspenderState.Active -> TaskManager.resumeTask(taskInfo, TaskStatus.Source.SYSTEM)
|
||||
|
||||
Reference in New Issue
Block a user