Asynchronous tasks inside a Ghidra Extension #3381
-
Hi, I am developing a Ghidra Extension that query an API with the current program sha256 and then fill a table with the results. The thing is the API queries can take more than 30sec (this is intended) and Ghidra completely freezes during this period of time. What would be the best way to make asynchronous tasks inside a Ghidra Extension ? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 11 replies
-
I can only give a quick answer right now...Ghidra provides a Task API for this sort of thing. Try searching for classes that start with Task for examples. |
Beta Was this translation helpful? Give feedback.
-
In addition to doing your stuff in a Task thread, since you are using a TableModel, you might be able to do a ThreadedTableModel. There are several examples in the code base, but the main idea is that you do your slow work in your model's doLoad() method. |
Beta Was this translation helpful? Give feedback.
I can only give a quick answer right now...Ghidra provides a Task API for this sort of thing. Try searching for classes that start with Task for examples.