<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
<title></title>
</head>
<body>
<p style="margin: 0px;"><span> </span></p>
<p style="margin: 0px;"> </p>
<div style="margin: 5px 0px 5px 0px;">
Michael Schnell <mschnell@lumino.de> hat am 9. Juni 2011 um 11:46 geschrieben:<br/>
<br/>
> On 06/09/2011 10:58 AM, Henry Vermaak wrote:<br/>
> > You will corrupt the linked list that QueueAsyncCall() uses when you<br/>
> > call it from multiple threads, so you _must_ protect it.<br/>
> As QueueAsyncCall is specified exactly for this use, it needs to take<br/>
> care of this issue internally. Otherwise it obviously is buggy. I trust<br/>
> that the LCL developers did a decent job.
</div>
<p style="margin: 0px;"> </p>
<p style="margin: 0px;">The only "specification" I found for TApplication.QueueAsyncCall is the fpdoc entry:</p>
<p style="margin: 0px;">Insert a given asynchronous call into the queue</p>
<p style="margin: 0px;"> </p>
<p style="margin: 0px;">Why do you think it is thread safe?</p>
<p style="margin: 0px;"> </p>
<div style="margin: 5px 0px 5px 0px;">
<br/>
> (The list access needs to be protected even with a single worker thread,<br/>
> as the main thread removes elements in a concurrent access anyway.)
</div><br/>
<br/>
Mattias<br/>
<br/>
</body>
</html>