(Gast)
n/a Beiträge
|
Re: Multi/Dualthreading - Laufzeit: Strings Thread -> VCL
20. Mär 2008, 19:49
Delphi-Quellcode:
type
TMyThread = class(TThread)
private
fCS: TCriticalSection;
fFile: String;
function GetFile: String;
procedure SetFile(file: String);
public
property File: String read GetFile;
procedure FindFiles;
end;
function TMyThread.GetFile: String;
begin
fCS.Enter;
Result := fFile;
fCS.Leave;
end;
procedure TMyThread.SetFile(file: String);
begin
fCS.Enter;
fFile := file;
fCS.Leave;
end;
property TMyThread.FindFiles;
begin
...
SetFile(currentFile);
...
end;
|
|
Zitat
|