summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@users.sourceforge.net>2008-10-12 19:59:57 +0200
committerTomas Bzatek <tbzatek@users.sourceforge.net>2008-10-12 19:59:57 +0200
commit03e95ee05bda9778d8b572fea7c48450d602fa70 (patch)
treeba759a1a10403f3ed50e6d6665a3263d40c7f738
parent0e5989ece5ea7d481c45121263d9630f15a57529 (diff)
downloadtuxcmd-03e95ee05bda9778d8b572fea7c48450d602fa70.tar.xz
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
-rw-r--r--UMain.pas5
1 files changed, 4 insertions, 1 deletions
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.']);