From kde-devel Tue Aug 20 18:12:41 2002 From: Fred Malabre Date: Tue, 20 Aug 2002 18:12:41 +0000 To: kde-devel Subject: Re: multithreading (dcop) X-MARC-Message: https://marc.info/?l=kde-devel&m=102986731123499 Do you lock any resource while you play the message? In other words, would it be possible to play several messages simultaneously? If yes, then you should definitly go with the option of starting a new thread each time you play a message. Obviously, it will use more CPU if you do more work for a given time. But the overall usage of the CPU will be the same (CPU load higher for a short time, or lower for a longer time). If you lock a resource and can not play simultaneous message, then go with your message queue, for which you will have synchronization to do between your threads. Fred. --- Pupeno wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > It seems that I have to change the proklam > architecture a bit to make it > multithreading because it can receive a message > while processing another one. > Where can I read about making multithreads > applications ? > Is it ok to have two threads, one waiting for > incoming messages and the other > one checking if there are messages and playing them > or should I start the > 'playing' thread when a message arrives and finish > it when there's no more > messages (I think this can have implications in the > CPU usage). > Thanks. > - -- > Pupeno: pupeno@pupeno.com > http://www.pupeno.com > - --- > Help the hungry children of Argentina, > please go to (and make it your homepage): > http://www.porloschicos.com/servlet/PorLosChicos?comando=donar > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.0.7 (GNU/Linux) > > iD8DBQE9YmmLLr8z5XzmSDQRAv5OAKCvyZyuSj7E2rrb9ksinPPX+8+7CACg0FXB > MuZxPMYXyyEw4/eOQk3JJNM= > =Asr4 > -----END PGP SIGNATURE----- > > > >> Visit > http://mail.kde.org/mailman/listinfo/kde-devel#unsub > to unsubscribe << __________________________________________________ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<