Subj : Re: Challenge: Multithreading & Synchronization To : comp.programming.threads From : Uenal Mutlu Date : Wed May 18 2005 11:32 pm "David Schwartz" wrote > > "Uenal Mutlu" wrote in message > > > "David Schwartz" wrote > > >> "Uenal Mutlu" wrote in message > > >> > If you feel it needs to be fixed then just say what part you think > >> > should > >> > be fixed. > >> > What's unclear to you? > >> > The aim is to collect multiple solutions to the problem. > > >> You've started by mandating a horribly bad architecture, namely one > >> in > >> which a very large number of threads is used. The first step to solving > >> the > >> problem if it occured in the real world would be to rearchitect so that > >> only > >> a small number of threads was needed. > > > You can also take, say just only 10 threads. The problem would be > > obviously > > the same for any number of threads >=2. > > It is not the number of threads, but the forced association between a > thread and something outside the program that has a long duration, such as a > connection or client. How can you make such an assumption? It is nowehere stated. It depends on the session protocol, and it's up to the threadproc and/or the calling (ie. main) thread to handle such things, for example: closing a session after x seconds inactivity etc. (unless you mean something different). .