2 unit IdThreadMgrDefault
;
10 TIdThreadMgrDefault
= object(TIdThreadMgr
)
12 function GetThread
: PIdThread
{TIdThread}; virtual;// abstract;// override;
13 procedure ReleaseThread(AThread
: PIdThread
{TIdThread});virtual;// override;
15 PIdThreadMgrDefault
=^TIdThreadMgrDefault
;
17 function NewIdThreadMgrDefault(AOwner
: PObj
):PIdThreadMgrDefault
;
24 function NewIdThreadMgrDefault(AOwner
: PObj
):PIdThreadMgrDefault
;
26 New( Result
, Create
);
29 function TIdThreadMgrDefault
.GetThread
: PIdThread
{TIdThread};
31 result
:= CreateNewThread
;
34 // ActiveThreads.Add(result);
39 procedure TIdThreadMgrDefault
.ReleaseThread(AThread
: PIdThread
{TIdThread});
41 if not IsCurrentThread(AThread
) then
43 AThread
.TerminateAndWaitFor
;
48 // AThread.FreeOnTerminate := True;
52 // ActiveThreads.Remove(AThread);