P
prtmon
Unregistered / Unconfirmed
GUEST, unregistred user!
线程类
type
TPrcDataThread = class(TThread)
private
PrcNo:Integer;
//私有变量
protected
procedure Execute;
override;
public
constructor Create(CommNo:Integer);
end;
线程建立
constructor TPrcDataThread.Create(CommNo:Integer);
begin
inherited Create(True);
PrcNo:=CommNo;
FreeOnTerminate:=True;
Priority:=tpLowest;
end;
procedure TPrcDataThread.Execute;
在这里调用PrcNo,发现此变量经常读不到值,为什么啊?
type
TPrcDataThread = class(TThread)
private
PrcNo:Integer;
//私有变量
protected
procedure Execute;
override;
public
constructor Create(CommNo:Integer);
end;
线程建立
constructor TPrcDataThread.Create(CommNo:Integer);
begin
inherited Create(True);
PrcNo:=CommNo;
FreeOnTerminate:=True;
Priority:=tpLowest;
end;
procedure TPrcDataThread.Execute;
在这里调用PrcNo,发现此变量经常读不到值,为什么啊?