Computer Science Canada Can processes be used in this way? |
Author: | richcash [ Mon Aug 14, 2006 12:34 am ] | ||
Post subject: | Can processes be used in this way? | ||
Well, I know that processes are ugliest, worst organized, most inaccurate subprogram invented, and I agree that 90% of the time they are improperly used, but I think maybe you can use them when you want the user to interact with the mouse to choose settings or select a gamepiece and move. If you want to load something like pictures (especially SLOW rotated pictures), do advanced calculations, or do recursion that takes a long time (chess, maybe checkers), you can do some, most, or all of it while the user is interacting with another part of the program with the mouse (not keyboard!). For example, like this :
If you click before 5 seconds is up, it waits the remainder of 5 seconds and exits, if you click after the 5 seconds is up, it exits immediately. So, am I right, can processes be used for this, or might it ruin the recursion, loading, or calculations? |
Author: | Cervantes [ Mon Aug 14, 2006 7:36 am ] |
Post subject: | |
You're right. Threading is good for performing calculations while waiting for input or other execution halting things. |