04.01.2016, 20:00, "Etienne Sandré-Chardonnal" <etienne.san...@m4x.org>:
> Dear All,
>
> I have a server app which currently spawns threads for processing tasks from 
> incoming connections.
>
> I need to isolate these tasks in processes instead of threads (there are 
> several reasons for this, including the fact that tasks will run possibly 
> bugged plugin code and this should not crash the server process).
>
> What is the best Qt way to communicate with the child processes? I have first 
> thought using standard input/output, but it seems that it's impossible to 
> wait for incoming data from stdin without polling. The other alternative I 
> see is TCP Sockets, but is there an overhead? The amount of data may be quite 
> large (a few MB/s).

Don't use TCP sockets for local communication. Use QLocalSocket (or AF_UNIX 
directly).

stdin does not differ much from sockets, it is in blocking mode by default (so 
you don't need to use polling), and can be switched to non-blocking mode.


-- 
Regards,
Konstantin
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to