[Lazarus] Prevent from deadlock while writing something large to a pipe

Kiên Nguyễn Tiến Trung kc97ble at gmail.com
Fri Oct 9 17:46:10 CEST 2015


Thank you. I will try again with multi threading.

2015-10-09 22:10 GMT+07:00 Sven Barth <pascaldragon at googlemail.com>:

> Am 09.10.2015 16:37 schrieb "Kiên Nguyễn Tiến Trung" <kc97ble at gmail.com>:
> >
> > I want to send a big amount of data to a child process through pipe.
> However, it is stated in the documentation that writing too much into the
> pipe may cause a deadlock.
>
> That is not necessarily a deadlock. It just blocks until the receiving
> profess is ready to process more input. Of course you should process it's
> output, cause if it can't write into its output anymore it can't normally
> read from its input either ;)
> That said you could write into the Input in a separate thread, this way
> your GUI stays responsive.
>
> Regards,
> Sven
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20151009/c0f8030a/attachment-0003.html>


More information about the Lazarus mailing list