Couple of improvements here:
1. Previously, ProgressProc was called whenever the LZMA encoder decided to report progress. This usually worked OK, but with some settings/data, there could be long delays between each progress report, e.g. half a second or more, and this made the IDE's UI slow to respond. Now, instead of waiting on progress reports, the main thread wakes itself up at a fixed interval to check for progress changes.
2. When progress was being reported, the worker thread previously waited until the main thread finished handling the event. (I can't recall exactly why it did that; it may have been an attempt to improve UI responsiveness on single-core systems by effectively forcing context switches.) This wait has been eliminated, allowing the main thread to update its UI while compression continues concurrently.