Skip to content

Commit

Permalink
Kill workers with terminate without unecessary joining
Browse files Browse the repository at this point in the history
  • Loading branch information
laggykiller committed Mar 23, 2024
1 parent a7b0b9e commit ef3c276
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/sticker_convert/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from __future__ import annotations

import os
import platform
import shutil
import traceback
from datetime import datetime
Expand Down Expand Up @@ -182,11 +181,7 @@ def kill_workers(self, *_: Any, **__: Any) -> None:
self.is_cancel_job.value = 1 # type: ignore

for process in self.processes:
if platform.system() == "Windows":
process.terminate()
else:
process.close()
process.join()
process.terminate()

self.cleanup(killed=True)

Expand Down

0 comments on commit ef3c276

Please sign in to comment.