<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi FPC team,<br>
<br>
Unfortunately I never got an answer to the message below. <br>
<br>
Some minutes ago I did a little support for a colleague of mine,
who uses Delphi XE2 (which I don't know very well, as I still work
with the free "Turbo Delphi"). <br>
<br>
Here I found that the <b>TThread.Queue</b> function now in fact
is fully supported and documented (but it has been slightly
modified/enhanced regarding the times of my "Turbo". ) Thus
finally Delphi Users can queue events for the main thread without
needing to use the clumsy and unportable Windows messages stuff. <br>
<br>
The class function TThread.Queue with a single parameter now is
defined as <b>protected</b> and thus is only usable with derived
classes, which does make sense, as here you normally are within
the execute procedure of a user TThread object and supposedly will
not want to define another thread as being the currently running.
<br>
<br>
As with Turbo Delphi the class function TThread.Queue with two
parameters can be used. The first Parameter seemingly should give
the TThread instance that is associated with the current (running)
threads, but also <b>NIL</b> can be given, which in fact is the
same as calling TThread.Queue with a single Parameter. (Turbo
Delphi used " self" to denote the current thread, XE tries to find
the running thread with<b> TThread.CurrentThread</b>). <br>
<br>
(The class-function TThread.CurrentThread also is new and might be
prone to be implemented in the RTL..) <br>
<br>
So I understand that TThread.Queue has "arrived" in Delphi and it
should be made available in FPC, as well (this can't be done by
the Lazarus team, as TThread is defined in the RTL). This could be
done by a simple call to <b>Application.QueueAsyncCall</b>, but
supposedly a less Lazarus-depending implementation (similar to
TThread.Synchronize or even using TThread.Synchronize, as Delphi
does) would be more appropriate.<br>
<br>
-Michael<br>
<br>
<br>
<br>
On 11/13/2012 09:35 AM, Michael Schnell wrote:<br>
</div>
<blockquote cite="mid:50A20661.5080801@lumino.de" type="cite">I
already mentioned this some time ago, but I don't know if this
issue is already turned down and/or if it makes sense to create
another entry in Mantis.
<br>
<br>
I feel it makes sense to add the (in Delphi 7 existing bun
undocumented) TThread.Queue() procedure and/or the last parameter
( "QueueEvent: Boolean = False" ), D7 provides with
TThread.Synchronize.
<br>
<br>
(Of course I do like the more portable
"Application.QueuAsyncCall" workalike a lot better, but Lazarus at
al can't implement this Delphi compatible Stuff unless provided by
the RTL.)
<br>
</blockquote>
<br>
</body>
</html>