FileExplorer icon indicating copy to clipboard operation
FileExplorer copied to clipboard

check if cache loop task is running before starting new thread

Open jokorone opened this issue 1 year ago • 5 comments

Fixes #26, resolves #41

jokorone avatar Jun 30 '23 15:06 jokorone

I'm very sorry for the linting, clippy doing it's thing 🤷

jokorone avatar Jun 30 '23 15:06 jokorone

I don't think this should be merged. At least not yet.As stated here https://github.com/conaticus/FileExplorer/issues/26#issuecomment-1614729615 this would be a work around. We could possibly fix the thing causing the panic instead of just spawning a new thread every 30 seconds needlessly.

RaphGL avatar Jun 30 '23 15:06 RaphGL

~~Thanks for the PR, this needs to be opened on the dev branch please.~~

Nevermind I forgot I could edit it 🤦‍♂️I agree with Raph that we shouldn't merge this as we need it fully tested first.

conaticus avatar Jun 30 '23 15:06 conaticus

I merged the dev branch into my branch and added a task_running flag to check if the old thread is still running. While it's still debatable if a 30sec interval does the job, now it won't run into infinites If I thought this through right.

jokorone avatar Jun 30 '23 17:06 jokorone

I merged the dev branch into my branch and added a task_running flag to check if the old thread is still running. While it's still debatable if a 30sec interval does the job, now it won't run into infinites If I thought this through right.

I will test this with a Mac user later in addition to #33. Also please make sure you claim issues by pinging me in the comments so I can assign you. This is just in case someone is already working on it. Duplicate PRs have occurred few times before so I'll work on some contribution guidelines.

Thanks for your help!

conaticus avatar Jun 30 '23 17:06 conaticus