[Qt-interest] Signal/Slot model is suitable for GUI applications but it isn't for console applications

Atlant Schmidt aschmidt at dekaresearch.com
Mon Aug 23 15:27:36 CEST 2010


Eirik:

> I think it is safe to say that for inter-thread communication, queued
> signals/slots are your only option while keeping processing in the
> individual threads.

  Perhaps I'm misunderstanding what you're saying here.

  There are plenty of alternatives besides signals/slots
  for inter-thread communication. One can use any of the
  various IPC mechanisms, especially shared memory and
  mutexes.

  Signals/slots "are your only option" only if you've
  decided to use signals/slots ;-).

                           Atlant

-----Original Message-----
From: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] On Behalf Of Eirik Ulvik
Sent: Monday, August 23, 2010 8:55 AM
To: qt-interest at trolltech.com
Subject: Re: [Qt-interest] Signal/Slot model is suitable for GUI applications but it isn't for console applications

I think it is safe to say that for inter-thread communication, queued
signals/slots are your only option while keeping processing in the
individual threads.
For signal/slot performance there is something in the docs:
http://doc.qt.nokia.com/4.6/templates.html in the chapter "Calling
Performance is Not Everything". However I would never emit a signal in a
tight for-loop or in compute intensive code. In my application I use
signals and slots for syncronisations between threads and such.

Regards,
Eirik

Den 23.08.2010 14:45, skrev Valeriy Portnyagin:
> hi all,
>
> Could i say that Signal/Slot model is suitable for GUI applications but
> it isn't  for console applications?
> I am developing a console application with many threads. I am using the
> signals and slots between the threads.
> How much performance of my application will be worse at usage of
> Signal/Slot model?
>
> regards,
> Valery Portnyagin.
>
>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest


This e-mail and the information, including any attachments, it contains are intended to be a confidential communication only to the person or entity to whom it is addressed and may contain information that is privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender and destroy the original message.

Thank you.

Please consider the environment before printing this email.




More information about the Qt-interest-old mailing list