Add Progress Bar with Background Thread
For tasks where users need to see progress From the Multi-Threading AI Coding Building Block.
I have a long-running task in my [app] that [processes files / converts data / downloads multiple items]. I want to show real-time progress to the user. Set up a background thread that: - Runs the task without freezing the UI - Reports progress back to the main thread (percentage or step count) - Updates a progress bar smoothly as the task advances - Allows the user to cancel the task mid-way - Shows "Done!" when complete and re-enables the start button My stack: [your language and framework here] I'm learning, so explain each part simply.