J
juemimima11
Unregistered / Unconfirmed
GUEST, unregistred user!
熟悉cnpack线程池的进,谢谢以下为线程池执行过程ProcessRequestprocedure TfrmTest.ProcessRequest(Sender: TCnThreadPool; aDataObj: TCnTaskDataObject; aThread: TCnPoolingThread);var d: TSendData; t: TSendThread;begin d := TSendData(aDataObj); t := TSendThread(aThread); if (d = nil) or (t = nil) then Exit; Inc(ProcessCount); try t.idhttp1.Head(d.FMsg);//编译无错,但是跑到这一步就except了,请问怎么弄 sReadln:=t.idhttp1.Response.RawHeaders.ValueFromIndex[1]; t.Synchronize(Updatemmo1); except end;end;附上TSendThread的构造函数constructor TSendThread.Create(aPool: TCnThreadPool);begin //OutputDebugString('TSendThread.Create'); inherited; FIdTCPClient := TIdTCPClient.Create(nil); idhttp1:=tidhttp.Create(nil); idhttp1.HandleRedirects:= false; idhttp1.ReadTimeout:= 150000; end;t.idhttp1.Head(d.FMsg);//编译无错,但是跑到这一步就except了,请问怎么解决,是不是线程没同步还是别的原因