[lazarus] Working with Sockets
Michael.VanCanneyt at Wisa.be
Michael.VanCanneyt at Wisa.be
Mon Dec 9 07:34:03 EST 2002
On Mon, 9 Dec 2002 matooo at email.si wrote:
> > end else
> > Inc(x);
> > Inc(apos);
> > end;
> > raise EXMLReadError.Create('In ' + Filename + ' (line ' + IntToStr(y)
> > + ' pos IntToStr(x) + '): ' + descr);
> > end;
> >
>
> ups, I missed that one. but I still wonder why jumps out in heavy threaded
> console app. simple app works fine with this exception.
Because the 1.0 RTL is not thread safe. The exception stack is shared
across threads, this is what causes your problem. This should be solved in
the 1.1 compiler, but the thread support is not yet stress tested, although
tests seem to indicate that it works fine.
>
> i guess i'll just work around my way. it's funny i tried two other methods that
> get blown in heavy threading. in simple app they work just fine. unfortunatelly
> simple apps is not what i need. on the other hand major tread doesn't cause any
> problems with exceptions.
Why not use fork() and child apps ? You should have no problems then. You
can use shared memory to communicate between the threads if you need that.
Michael.
More information about the Lazarus
mailing list