sketchwindows update finish Concurrent problem
Describe the bug
**fun onUpdate(text: String) { myText = text val codeFenceList = CodeFence.parseAll(text) runInEdt { ......**
**AutoDevCoroutineScope.workerScope(project).launch { flow.cancelHandler { toolWindow.handleCancel = it }.cancellable().collect { char -> suggestion.append(char) toolWindow.onUpdate(suggestion.toString()) } toolWindow.onFinish(suggestion.toString()) }**
Because the update method is executed in the edt thread, the parsing logic is relatively heavy, which will cause the actual processing speed to be much lower than the token delivery speed. This will result in the update being delivered with all tokens, but the edt has not processed all tokens, and a "finish" will appear Executing it in advance will lead to some unexpected disorders in the interaction
Because the number of tokens is unpredictable, perhaps this problem can be solved through the dynamic features of juc Phaser
same to #412