Message 1 of 4
Python: Running a time-taking process/function in background without freezing UI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I am working on a python based plugin. I am calling a few functions that send web requests and wait for a response. The problem is, the UI freezes while the function waits for the request to complete. I am uploading geometries and performing some status-checking REST calls continuously. I also wish to show the progress while it's all happening. So, my requirement is:
1.) I need to run the time-taking function calls in the background, separate from the main thread, so the UI doesn't freeze.
2.) Update the progress in the progress bar, by tracking the status of the calls. I want to know how I can track what's happening in the separate thread.
Can someone please suggest a good solution?
Thanks in advance