multithreading or multitasking
hello
Does anybody have any idea about a simple multitasking application or program
i have to come up with the idea before monday .... any thing concerning programming a multithreading or multitasking
program or application ...
i am stuck and i want your help please
Re: multithreading or multitasking
Multitasking is the ability of an operating system to run more than one program in parallel, and what the user of said OS does when he makes use of this ability. Nothing to do with single applications.
Multithreading is the splitting of various pieces of work into separate threads of execution, either to make the program seem more responsive or to make use of multi-core systems that can actually execute more than one thread at the same time.
If you want a graphical multi-threaded example, I can give you this exercise from Charles Petzold's Programming Windows:
Create a main window. Divide this window into four areas of equal sizes. Each of this areas has a job to do:
Area 1 simply writes integers, from 0 and ever increasing.
Area 2 generates and displays prime numbers.
Area 3 displays the Fibonacci sequence.
Area 4 draws circles of random sizes.
All four actions should seemingly be at the same time. Use threads to solve this problem.
In Petzold's book, the code covers just under 5 pages, so it should be manageable. Using QuickBasic 2.0 and no threads, Bill Gates solved it in less than half an hour.