From 03e95ee05bda9778d8b572fea7c48450d602fa70 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Sun, 12 Oct 2008 19:59:57 +0200 Subject: Fix strange race condition with Kylix There's another race condition when copying from gvfs mount (ftp on local lan). Needs more debugging. All in all, everything is fine with FreePascal --- UMain.pas | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/UMain.pas b/UMain.pas index 90f61b5..e214947 100644 --- a/UMain.pas +++ b/UMain.pas @@ -1741,11 +1741,14 @@ var ListView: TGTKListView; OpenDirThread.AHighlightItem := HiliString2; end; DebugMsg(['(II) TFMain.ChangingDir: begin thread']); - OpenDirThread.Resume; tt := Now; b := False; FRemoteWait := TFRemoteWait.Create(Application); FRemoteWait.ParentForm := FMain; + + // WARNING: For an unknown reason, there's a race condition in Kylix (FPC is fine). + // The thread must be started *after* the FRemoteWait is created. + OpenDirThread.Resume; repeat Sleep(ConstInternalProgressTimer); // DebugMsg([' (II) TFMain.ChangingDir: sleep.']); -- cgit v1.2.3