OSDN Git Service

終了化で呼び出すダウロードスレッド群の処理を修正
authorh677 <h677>
Mon, 11 Feb 2008 16:42:40 +0000 (16:42 +0000)
committerh677 <h677>
Mon, 11 Feb 2008 16:42:40 +0000 (16:42 +0000)
Giko.pas
ThreadControl.pas

index 2490c69..20f8445 100644 (file)
--- a/Giko.pas
+++ b/Giko.pas
@@ -1550,6 +1550,8 @@ begin
     GikoDM.CloseAllEditorAction.Execute;
 
        Application.UnhookMainWindow(Hook);
+    //\83A\83v\83\8a\83P\81[\83V\83\87\83\93\8fI\97¹\82Ì\91O\82É\83_\83E\83\93\83\8d\81[\83h\83X\83\8c\83b\83h\82É\90³\8fí\8fI\97¹\82ð\91£\82· 
+    FControlThread.Terminate;
        Application.Terminate;
 end;
 
index b3e8e75..8b09718 100644 (file)
@@ -108,10 +108,14 @@ begin
                end;
         Application.ProcessMessages;
        end;
+    // \8ec\82Á\82Ä\82¢\82é\83X\83\8c\83b\83h\82ð\91S\82Ä\8fI\97¹\82³\82¹\82é\81B
        for i := 0 to FThreadList.Count - 1 do begin
+        TDownloadThread(FThreadList[i]).Abort;
                TDownloadThread(FThreadList[i]).Terminate;
-               if TDownloadThread(FThreadList[i]).Suspended then
+               if TDownloadThread(FThreadList[i]).Suspended then begin
                        TDownloadThread(FThreadList[i]).Resume;
+            TDownloadThread(FThreadList[i]).WaitFor;
+        end;
        end;
 
 end;