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
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.
The text was updated successfully, but these errors were encountered:
WutingjiaX
changed the title
Is the code writing method for server-side push in Pylsp thread unsafe?
Is the server-side push in Pylsp thread unsafe?
Jun 28, 2024
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.
The text was updated successfully, but these errors were encountered: