Closed error454 closed 6 years ago
This looks good, have you tested that it behaves as expected?
This looks good, have you tested that it behaves as expected?
Yes, I've been testing over the last 2 days. It works perfectly and memory usage looks perfect.
Awesome, what I estimate as maximum of ~100-1000ish core cache misses (mutex) per zip should also be ok and not a concern in my mind.
Merged.
forgot to actually merge it... 🥇
ProgressCallback.h
Changed to use pure virtual functions to eliminate a compile error on the UE4 library side.
ArchiveExtractCallback
/ArchiveUpdateCallback
Implementation of
CheckBreak()
. The primary means of allowing zip operations to break is to returnCheckBreak()
in the vast majority of interface callbacks that an archive gets over its lifetime. As to which callbacks should returnCheckBreak()
vs not, this was mostly copied from the SevenZip sample code. I did omit the check fromGetProperty
because it seemed a little overkill and I was also mildly (perhaps without reason) worried about hitting the mutex on theFThreadSafeBool
too frequently sinceGetProperty
seemed high on the most frequently called list.Since this is COM, returning
E_ABORT
in any of these callbacks effectively terminates the operation.CheckBreak()
is simply an easy entry point that in-turn calls through to theProgressCallback
virtual methodOnCheckBreak()
which is overriden in the UE4 library implementation using anFThreadSafeBool
.