-
-
Notifications
You must be signed in to change notification settings - Fork 347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wait for progress token using Barrier when indexHieFile #4205
base: master
Are you sure you want to change the base?
Wait for progress token using Barrier when indexHieFile #4205
Conversation
1440f35
to
d70acdb
Compare
Could we refactor this to actually use the helpers from |
This code manages its progress token in a somewhat unique way which is not easy to statically scope with the lsp progress functions. |
_ <- LSP.sendRequest LSP.SMethod_WindowWorkDoneProgressCreate (LSP.WorkDoneProgressCreateParams u) (const $ pure ()) | ||
b <- liftIO newBarrier | ||
void $ LSP.sendRequest LSP.SMethod_WindowWorkDoneProgressCreate (LSP.WorkDoneProgressCreateParams u) $ liftIO . signalBarrier b | ||
ready <- liftIO $ waitBarrier b |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if its a good idea to delay indexing by an unbounded amount of time waiting for the client to respond with a progress token. Perhaps the progress reporting should be on another thread which doesn't block indexing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, but indexHieFile would return without reportProgress actually report done🤔. I am not sure how does it do to our test, I'll see how it goes.
Instead of a long runner task, it is more like tunes of small tasks dynamically created only finished when the all the pendding tasks are done. Hard to fit this in helpers from lsp. |
…ut of order in report progress
…token-indexHieFile' into soulomoon/wait-for-token-indexHieFile
I've spawn a new thread to run the indexing progress update, send through TQueue. 🤔 Is it a good idea to do so? |
I think we can probably do something like #4218 now |
No description provided.