Multitasking in Small Basic
Key Point of Multitasking
What is the difference between single tasking and multitasking?
If two or more tasks work at the same time, some (hardware or software) resources should be shared among them. The resources may be mouse, timer, variables, or object properties.
LDCall Object in LitDev Extension
There is a useful object LDCall in LitDev extension for multitasking in Small Basic. YLed wrote a good sample of LDCall object. This program shows beautiful pictures and play music simultaneously.
I modified his program and published as ZMN750-0. The original ZMN750 has a little problem that the sub task (music) ends faster than the main task (slides) and shows "The End" message with larger font. When the sub task shows the message, it changes GraphicsWindow.FontSize. After that, the description for photos are displayed with the larger font. This property is the software resource the two tasks should be share.
Thank you very much YLed for sharing fantastic program. And also thank you litdev for providing nice challenges and the extension.
See Also
- Small Basic – Synchronous and Asynchronous Type Operations
- Asynchronous music with slides show (forum)
- Slideshow with 2 songs ( Für Elise followed by Andantino of Carulli ) , final version. (forum)
- Challenge of the Month - September 2016 (forum)
- Small Basic: Event Basics (wiki)
Comments
- Anonymous
September 20, 2016
Simply Wonderful article !!! Nonki :) - Anonymous
September 22, 2016
Wonderful article !! and many thanks to you and LitDev for the help :) - Anonymous
September 22, 2016
Thanks YLed again. And thanks litdev for sharing ZMN750-1 (flicker free version).