You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I want to achieve the effect of vscode, when the code is very long, first of all, one thread of vscode will refresh the code color from the code in the visual area (the color may be wrong at this time), and then another thread will refresh the color from changing the position. At this time, there will be a phenomenon that the syntax starts two threads.
In this way, you can achieve the rapid response of code color and ensure the correctness after refreshing.
It parses the viewport in the UI thread and starts parsing the document in a bg thread. Every time the viewport is scrolled, the view port is re-parsed.
Repository owner locked and limited conversation to collaborators on Jun 28, 2022
Calling "grammar.TokenizeLine(line,rulestack)" by two threads at the same time will cause thread safety problems. How do you solve them?