[Qt-interest] Send signal from one thread to another (all threads sends in one loop)
Николай Шатохин
n.shatokhin at gmail.com
Thu Jun 23 16:06:25 CEST 2011
Mistake in topic's name - all threads created in one loop
2011/6/23 Николай Шатохин <n.shatokhin at gmail.com>:
> Hello.
>
> I have server that creates new thread for every incoming connection
> (and gives unique id for every thread). I need to send signal from one
> thread to slot in another thread. How can I do this? Now, I send
> signal with receiver's id from thread to slot in server and server
> send signals to slots in every thread. Threads compare their ids with
> receiver's id and if they match - run code in slot. It works but maybe
> exists simplest method? How to send signal from one thread to slot in
> another directly? I will glad if somebody shows me example of source.
>
> Best regards,
> Nick.
>
> P.S. Sorry for my English. I'm studying now.
>
More information about the Qt-interest-old
mailing list