Hi,
What exactly does this
System.IsMultiThread := true;
do ?
If I use external threads with my thread creation callback it works fine
with
System.IsMultiThread := false;
If I set it to true the app crashes when creating the first threads.
If I use the suggested initialisation with the dummy thread it works
too, but with
System.IsMultiThread := true;
Thanks in advance,
Maik
José Mejuto schrieb:
Hello Lazarus-List,
Wednesday, August 25, 2010, 10:05:32 PM, you wrote:
In Delphi setting IsMultithread to true is a must to use non TThread
threads. Taken from Embarcadero QA:
SB> FPC is not Delphi and in this regard those two differ.
Ok, I quoted Delphi just as a side note, and the reason I included it
in the message. In fact there is some routines here and there that
checks isMultiThread in order to perform or not locks. Of course, if
heap is not properly initialized... ;)
Also the one thread creation is only for Unix systems, win32 does not
have this problem since a lot of time.
SB> Windows DOES have this problem.
In that case I misunderstood a quite recent message in fpc mailing
list, my apologizes.
On the other hand, if Unix needs one thread creation then it should be
automagically done in the initialization section of cthreads, do not ?
SB> This might indeed be a solution.
If windows have the same problem, threading system should be
initialized in... somewhere automagically as windows multithread is
always present.
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus