Re: [Java-gnome-developer] Multithreaded apps (was: Re: broken link)
Brought to you by:
afcowie
From: Joao V. <jvi...@ya...> - 2005-01-11 02:52:09
|
Ok, i've read some more, i think i understand it now... still find it pretty odd though. Maybe later i'll put some more info about this issue on that topic on the website... i think it's needed, to make it more clear. Time to sleep now... Cheers, J.V. --- Joao Victor <jvi...@ya...> escreveu: > Err... sorry but i didn't understand the problem very well yet. BTW, there's a doc about it > here: > > http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html > > I've read parts of it, but still didn't understand (maybe i'm too sleepy...). I think the reason > why i didn't understand is because i've used threads many times on Swing apps, and i've never > used > invokeLater. Let me picture a simple example so we can work on it: > > Suppose you're making a chat client, where you have a List widget showing the online users. > Suppose you have a thread which is listening for new packets. Everytime this thread receives a > "New user" msg packet, it adds a new user to the List widget, and calls repaint (i think it's > not > necessary to call repaint on this situation, but whatever). > > So in this example there's no use of invokeLater, even though the widget is being updated by a > thread. Would this somehow "break" something? I mean... i think i've done that sometimes, never > seen any problem :P > > Cheers, > J.V. > > > > > > > > _______________________________________________________ > Yahoo! Acesso Grátis - Instale o discador do Yahoo! agora. http://br.acesso.yahoo.com/ - > Internet rápida e grátis > > > ------------------------------------------------------- > The SF.Net email is sponsored by: Beat the post-holiday blues > Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. > It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt > _______________________________________________ > java-gnome-developer mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/java-gnome-developer > __________________________________________________ Converse com seus amigos em tempo real com o Yahoo! Messenger http://br.download.yahoo.com/messenger/ |