mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 13:19:12 +02:00
* BeginThread() now returns the thread handle instead of the threadid
(needed because you have to free the handle after your thread is finished, and the threadid is already returned via a var-parameter)
This commit is contained in:
parent
b60412c102
commit
739e3ed581
@ -199,7 +199,6 @@ function GlobalFree(hMem : Pointer):Pointer; external 'kernel32' name 'GlobalFre
|
|||||||
writeln('Starting new thread');
|
writeln('Starting new thread');
|
||||||
{$endif DEBUG_MT}
|
{$endif DEBUG_MT}
|
||||||
BeginThread:=CreateThread(sa,stacksize,@ThreadMain,ti,creationflags,threadid);
|
BeginThread:=CreateThread(sa,stacksize,@ThreadMain,ti,creationflags,threadid);
|
||||||
BeginThread:=threadid;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -275,7 +274,12 @@ initialization
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.2 2002-10-31 13:45:44 carl
|
Revision 1.3 2003-03-24 16:12:01 jonas
|
||||||
|
* BeginThread() now returns the thread handle instead of the threadid
|
||||||
|
(needed because you have to free the handle after your thread is
|
||||||
|
finished, and the threadid is already returned via a var-parameter)
|
||||||
|
|
||||||
|
Revision 1.2 2002/10/31 13:45:44 carl
|
||||||
* threadvar.inc -> threadvr.inc
|
* threadvar.inc -> threadvr.inc
|
||||||
|
|
||||||
Revision 1.1 2002/10/16 06:27:30 michael
|
Revision 1.1 2002/10/16 06:27:30 michael
|
||||||
@ -285,4 +289,4 @@ end.
|
|||||||
* threads unit added for thread support
|
* threads unit added for thread support
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user