--nextPart2670815.2iJglvQNQA Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Sebastian Tr=FCg wrote: >On Sunday 29 June 2008 14:19:21 Kevin Krammer wrote: >> On Sunday 29 June 2008, Sebastian Tr=FCg wrote: >> > Apparently on Unix QLocalSocket uses QTcpSocket internally. This >> > results in a big problem when I want to use it in a multithreaded >> > environment as I cannot move the internal QTcpSocket to the new >> > thread. Does anyone have an idea on how to solve this issue? On how >> > to use QLocalSocket in multithreaded systems? >> >> On the server or the client side? >> >> On the client side you could use one QLocalSocket per thread. >> >> On the server side you can use the incomingConnection(quintptr) >> template method of QLocalServer and create the actual QLocalSocket in >> the target thread's context. We do this in Akonadi, see >> kdesupport/akonadi/server/src/akonadi.cpp and >> kdesupport/akonadi/server/src/akonadiconnection.cpp > >Thanks a lot for the hints. Seems to work. :) You should also be able to use the nextPendingConnection() method of=20 QLocalServer and push it to the thread that will do the work with=20 moveToThread(). =2D-=20 =A0 Thiago Macieira =A0- =A0thiago (AT) macieira.info - thiago (AT) kde.org =A0 =A0 PGP/GPG: 0x6EF45358; fingerprint: =A0 =A0 E067 918B B660 DBD1 105C =A0966C 33F5 F005 6EF4 5358 --nextPart2670815.2iJglvQNQA Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iD8DBQBIaOsFM/XwBW70U1gRAs8OAJoDOsLYEh4U9cUcdzGBmvuzN41urgCgqUQM RpGHNB5WvnNnxjMl0j65pts= =F/Db -----END PGP SIGNATURE----- --nextPart2670815.2iJglvQNQA--