On Mon, 2006-03-06 at 20:14 +0100, Roland Weber wrote: > Hi Oleg, > Hi Roland
As I said, I have no intention of imposing any design constraints on http-async and your work. > >>In http-async, I have background threads switching states and (beginning > >>in March) performing callbacks to application code. The operations of > >>these threads can not be logged appropriately by http-client. Throwing > >>exceptions is also pointless in background threads. > > > > I respectfully disagree. There are very simple but effective mechanisms > > to propagate exceptions from background threads to the controller > > thread. > > Any that do not rely on the controller thread to pick up the exception? > You seem to be trustful regarding the skills of application developers, > but I have a different mindset. I expect at least some of the application > developers to completely screw up thread synchronization, to deadlock > their threads or loose notifications, and then to blame http-async for > their freezing applications. I trust the log statements I put into my > code, but never the application. The log output will prove *them* wrong :-) > > >> Besides, I can't > >>throw an exception in case of a deadlock or similar misbehavior. > > > > Why not? > > Because the thread that should throw the exception is locked dead. > What if you do Thread#join(some_ms) on the background thread from the controller thread and then throw an exception? > > Neither do I. There are enough tools that can take care of all the dirty > > work for us. > > I don't trust tools either :-) > Have you seen "Conan the Barbarian"? In between my 'Das Kapital' reading sessions ;-) > Little Conan's father > points to the steel sword and says: "This, you can trust." > http://www.imdb.com/title/tt0082198/quotes > > I seriously doubt one should put the same trust into logging though > >>hope that the developers didn't forget to put in the one log statement > >>that would help me. > > > > What if they did? ;-) > > Then I curse the developers, start up the laptop and have a look directly > into the source code of our product to see what might have gone wrong or > what kind of second-rate logging information is available ;-) > I suppose you have seen 'The Fifth Element'? Remember what Zorg (the Bad Guy) said? "You want something done, do it yourself!" Oleg > cheers, > Roland > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
