Subj : Re: Threads suck To : comp.programming.threads From : Larry I Smith Date : Wed Jun 22 2005 07:19 pm Christopher Benson-Manica wrote: > Phlip wrote: > > (Moving to comp.programming.threads - if you don't read that group, > come back to clc++...) > >>Because I don't research OS kernels, embedded software, or other primitive >>spaces that need threads to get anything done, I have never seen a situation >>improved by a thread. Throwing a thread at a simple problem is worse than >>'goto'. If a button starts a process that takes too long, the process itself >>needs a better architecture. > > Well, my specific intention for this thread is for it to take care of > caching the contents of a file in memory as my program is starting. > The main thread can't wait that long, because the program is a Windows > service and the service manager isn't willing to wait forever for my > program to start. I know I could do this other ways, but is there > really a big disadvantage to spawning a thread to handle the caching > of this file? > No, not "a big disadvantage". Threads used correctly (it takes some practice) can enable quite complex & responsive applications. The "threads good or bad" discussion depends on many complex factors; like all tools, they have their uses, but they (nor anything else) are not a "silver bullet". Larry .