Il 06/09/2017 19:45, Andrea Mauri ha scritto:
2017-09-06 19:34 GMT+02:00 Sven Barth via Lazarus
mailto:lazarus@lists.lazarus-ide.org>>:
Maybe your file is not suitable? I used a /var/log/messages.log file
from one of my Linux computers and with that I can reproduce it with
the given
2017-09-06 19:34 GMT+02:00 Sven Barth via Lazarus <
lazarus@lists.lazarus-ide.org>:
> Maybe your file is not suitable? I used a /var/log/messages.log file from
> one of my Linux computers and with that I can reproduce it with the given
> code.
>
> Regards,
> Sven
>
>
> They are plain text file. At
Am 06.09.2017 17:36 schrieb "Mattias Gaertner via Lazarus" <
lazarus@lists.lazarus-ide.org>:
>
> On Wed, 6 Sep 2017 17:19:28 +0200
> Sven Barth via Lazarus wrote:
>
> >[...]
> > Both Synchronize and Sleep already causes a thread switch (the former
cause
> > it will wait for the main thread to fini
Note that his example works on my Mac with or without
sleep. Maybe if Andrea posts his full example we may find out more.
Mattias
Unfortunately I cannot post the real case, it is included in a bigger
unit involving other stuffs.
Anyway the example I posted is quite the same.
In order to bet
On Wed, 6 Sep 2017 17:19:28 +0200
Sven Barth via Lazarus wrote:
>[...]
> Both Synchronize and Sleep already causes a thread switch (the former cause
> it will wait for the main thread to finish processing). Also I already
> suggested TThread.Yield which is the same as ThreadSwitch.
> And as he wr
On 06/09/17 16:19, Sven Barth via Lazarus wrote:
> Am 06.09.2017 16:48 schrieb "el es via Lazarus"
> mailto:lazarus@lists.lazarus-ide.org>>:
>> - could the un-yielded code path lead to over-zealous enqueuing of the
>> ShowStatus routine?
>> - if yes, what would happen in such case?
>
> Both Syn
Am 06.09.2017 16:48 schrieb "el es via Lazarus" <
lazarus@lists.lazarus-ide.org>:
>
> On 06/09/17 15:26, el es wrote:
> > On 06/09/17 10:31, Andrea Mauri via Lazarus wrote:
> >> Il 05/09/2017 22:51, Sven Barth via Lazarus ha scritto:
> >>>
> >>> It is however solved if you add a "Yield;" after the
2017-09-06 16:26 GMT+02:00 el es via Lazarus
:
>
> Can you try ThreadSwitch after Sleep ?
>
> while (not Terminated) do
> begin
> if eof(f) then
> reset(f);
> ReadLn(f, newStatus);
> if NewStatus <> fStatusText then
> begin
> fStatusText := newStatus;
>
On 06/09/17 15:26, el es wrote:
> On 06/09/17 10:31, Andrea Mauri via Lazarus wrote:
>> Il 05/09/2017 22:51, Sven Barth via Lazarus ha scritto:
>>>
>>> It is however solved if you add a "Yield;" after the Synchronize
>>> call. So my suspicion is that the scheduling of Mac OS X is somehow
>>> messin
On 06/09/17 10:31, Andrea Mauri via Lazarus wrote:
> Il 05/09/2017 22:51, Sven Barth via Lazarus ha scritto:
>>
>> It is however solved if you add a "Yield;" after the Synchronize
>> call. So my suspicion is that the scheduling of Mac OS X is somehow
>> messing things up. Either the scheduling is
Il 05/09/2017 22:51, Sven Barth via Lazarus ha scritto:
It is however solved if you add a "Yield;" after the Synchronize call.
So my suspicion is that the scheduling of Mac OS X is somehow messing
things up. Either the scheduling is favoring the one thread while it
shouldn't (though even reducin
On 05.09.2017 21:43, Andrea Mauri via Lazarus wrote:
>
> I notice that multiple people have already told you not to use a
> tight loop, and that applies to any OS.
>
>
>
> What exactly means tight? Is it something that I could measure in some way?
> The sample test I submitted to the fo
> I notice that multiple people have already told you not to use a tight
> loop, and that applies to any OS.
>
>
>
What exactly means tight? Is it something that I could measure in some way?
The sample test I submitted to the forum is not my real code, that is a
little more complex, and it does any
On 05/09/17 13:00, Andrea Mauri via Lazarus wrote:
Dear all,
I have an issue using threads on OSX.Basically I have a thread reading a
file and looking for a string match.I have no problem on win and linux
but on osx my thread updates the form but my application does not
respond.I opened a topi
Dear all,
I have an issue using threads on OSX.
Basically I have a thread reading a file and looking for a string match.
I have no problem on win and linux but on osx my thread updates the form
but my application does not respond.
I opened a topic on the forum
(https://forum.lazarus.freepascal.
15 matches
Mail list logo