Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #14945
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!nntp.club.cc.cmu.edu!feeder.erje.net!usenet.ukfsn.org!not-for-mail |
|---|---|
| From | Martin Gregorie <martin@address-in-sig.invalid> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: A independant pile for communication |
| Date | Wed, 30 May 2012 20:53:01 +0000 (UTC) |
| Organization | UK Free Software Network |
| Lines | 18 |
| Message-ID | <jq61bd$q7r$1@localhost.localdomain> (permalink) |
| References | <4fc5bb99$0$1706$426a74cc@news.free.fr> |
| NNTP-Posting-Host | 84.45.235.129 |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | 8bit |
| X-Trace | localhost.localdomain 1338411181 26875 84.45.235.129 (30 May 2012 20:53:01 GMT) |
| X-Complaints-To | usenet@localhost.localdomain |
| NNTP-Posting-Date | Wed, 30 May 2012 20:53:01 +0000 (UTC) |
| User-Agent | Pan/0.135 (Tomorrow I'll Wake Up and Scald Myself with Tea; GIT 30dc37b master) |
| Xref | csiph.com comp.lang.java.programmer:14945 |
Show key headers only | View raw
On Wed, 30 May 2012 08:18:01 +0200, Olve wrote: > I could create a pile of message, create a Thread and have this pile > being read and displayed in run() with a wait() if the pile is empty and > a notifyAll() when the pile is fed. Using some sort of Queue to hold the messages would be most usual approach. Almost anything can be used to add messages: using transient threads that just add a message when its presented to your program, e.g. via e-mail or via a Socket, and then die is a possibility. The benefit of using a Queue is that the thread(s) processing the messages will block automatically when the Queue is empty. -- martin@ | Martin Gregorie gregorie. | Essex, UK org |
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
A independant pile for communication Olve <Olve@nowhere.wd.invalid> - 2012-05-30 08:18 +0200
Re: A independant pile for communication Martin Gregorie <martin@address-in-sig.invalid> - 2012-05-30 20:53 +0000
Re: A independant pile for communication Olve <Olve@nowhere.wd.invalid> - 2012-05-31 09:09 +0200
csiph-web