Can someone give me a description of what "threading" is in programing. thank you!!!!!!
Threading?
Collapse
X
-
the way that a computer runs programs is to create different processes for the processor to execute. theres a lot to keeping track of it all, but basically, this is what enables your computer to mulittask. (your computer never runs more than one process at a time - unless you have multiple processors - but by switching back and forth between them fast enough, it fools you into thinking that there are many different things running at once.) user and system programs are both executed in this way.
each process has a code section, a stack, etc. . . . a thread is the executing part of your process. by creating multiple threads, you can have your process pseudo-execute-in-more-than-one-place-at-once. this is useful if, say, you have one thread doing i/o (which is typically slow in computing terms) . . . you can also have a thread running a computational section, so as to not tie up that portion of things while your program has blocked waiting for the hard drive, for instance.
Comment