I have developed some business logic based on Pylsp (without modifying the logic related to WS). One of my business characteristics is that a didopen/didchange request may trigger a large number of server notifications.
But I found that there is a probability that it will cause the client to throw a 1002 error code, leading to the closure of the link.
If I make the interval of each notification longer(like sleep 0.1s) , this problem would not have occurred.
Under circumstances where there is a large number of pushes, by printing the thread number, I have indeed found that after a certain threshold(maybe 20?), it will switch from single-threaded to multi-threaded pushing.
I have developed some business logic based on Pylsp (without modifying the logic related to WS). One of my business characteristics is that a didopen/didchange request may trigger a large number of server notifications. But I found that there is a probability that it will cause the client to throw a 1002 error code, leading to the closure of the link.
If I make the interval of each notification longer(like sleep 0.1s) , this problem would not have occurred.
Under circumstances where there is a large number of pushes, by printing the thread number, I have indeed found that after a certain threshold(maybe 20?), it will switch from single-threaded to multi-threaded pushing.