[Lazarus] Multi-threading support in IDE
Martin
lazarus at mfriebe.de
Fri Aug 14 11:19:51 CEST 2009
sorry tested now.
doesn't work, outside windows world...
So even a blocking pipe should have some kind of CanRead that returns
immediately?
Martin wrote:
> Graeme Geldenhuys wrote:
>> Martin wrote:
>>> make it
>>> if (Application<>nil) and
>>> (abs(LastProcessMessages-Now)>((1/86400)/10))
>> This does not make much difference on my system. :-(
> Hm I tested on windows only. Try adding the 2 lines I inserted with
> comments (I have not tested this!!)
>
> Just seeing
> if (TheAsyncProcess=nil) and (fProcess.Output<>nil) then begin
> // using a blocking TProcess
> // Count := 0;
> // if fProcess.Output.NumBytesAvailable > 0 then
> Count:=fProcess.Output.Read(Buf[1],length(Buf));
> if Count=0 then begin
> // no output on blocking means, process has ended
> break;
> end;
> end;
>
>
>
> One more remark, if it works, it will allow normal editing,etc.
>
> But you can not do:
> - search and replace
> - find in files
> ...
>
> Because those themself are long running, and while being inside the
> compile's processMessages, the compile will not read the output, and
> that may block compiling.
>
> This is because all this stuff is not event-driven, so it cannnot be
> mixed.
> It would work in a single thread and all this, but it must be fully
> event-driven.
>
>
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
More information about the Lazarus
mailing list