Skip to content

Stop Analysis function in core API #4743

Answered by jsotuyod
sashokbg asked this question in Q&A
Discussion options

You must be logged in to vote

@sashokbg there is currently no public API to do this. What you can do at the moment is simply interrupting the thread used to launch the PMD analysis. Even if the analysis is multi-threaded it will completely shutdown the analysis.

We can't expose this as an API, as it assumes the current thread can be discarded, or requires to run everything in a worker thread in the off-scenario where this is actually needed… so it seems better to leave the consumer of such scenario to do the wrapping.

Alternatively we could drop the mono thread processor, have everything run on an executor service, even if it's only 1 thread, and expose an API to shutdown the executor, but that would fail to stop the …

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@adangel
Comment options

@sashokbg
Comment options

@oowekyala
Comment options

Answer selected by sashokbg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants