Subj : Re: will while(1); thread hang the CPU. To : comp.programming.threads From : Joe Seigh Date : Tue Sep 27 2005 08:50 am bobby wrote: > Hai, > > Can anyone tell me will a thread with while(1); infinite loop > hang the CPU. If not,how is the scheduling of other tasks performed? > In userspace your process will preempt on timeslice end and the scheduler will dispatch the next eligible process. You can also get preempted by i/o interrupts if the scheduler is notified that higher priority work is ready. Depends a lot on the actual OS. Some are better than others in handling this. On windows it will feel like your system is hung. -- Joe Seigh When you get lemons, you make lemonade. When you get hardware, you make software. .