pjrinaldi / wombatforensics

linux c++, fox-toolkit, multi-threaded forensic gui tool
GNU General Public License v2.0
47 stars 12 forks source link

If cancel while digging... #308

Closed pjrinaldi closed 4 years ago

pjrinaldi commented 4 years ago

If you cancel while digging, i need to determine which digging type is active and cancel it prior to exiting...

pjrinaldi commented 4 years ago

it cancels when exiting, but it won't leave until the final thread is finished....

need to see if there is a way to cancel it or stop the thread some other way, maybe from the globalthreadthing or some other way to force exit.

pjrinaldi commented 4 years ago

2 options...

  1. i either freeze everything waiting for the threads to finish which should then save the last running thread as well. but the program is hung until it completes the thread and doesn't wrap up and save everything else until the thread finishes.

  2. set a variable to not fail when the remaining thread finishes because i cleaned everything up already and closed the program window, so this variable will ensure function calls in the threads don't get called if the program isclosing = true.

I'm on the fence with both of them, they both have advantages and disadvantages...

pjrinaldi commented 4 years ago

Right now i am leaning towards option 2, isclosing boolean and losing last running threads but saving everything else and exiting better for the user... will implement and test later.

pjrinaldi commented 4 years ago

initial testing works using the isclosing boolean. it still takes a while to close, but the information is saved prior to what is still processing.

pjrinaldi commented 4 years ago

initial testing works using the isclosing boolean. it still takes a while to close, but the information is saved prior to what is still processing.