general questions about multitasking

Posted By: faustf

general questions about multitasking - 02/13/21 22:24

hi guys lite-c can do multi tasking app or multithred ? if yes anyone have some example or some page for read how to do that ?
thanks bye
Posted By: Jerome8911

Re: general questions about multitasking - 02/19/21 14:51

Hi faustf,

as far as I know the compiler already creates multiple threads by itself. Manually dealing with multiple threads is very complicated. But if you want to break your code manually into multiple threads you may use:

Code
CreateThread(0, 0, my_function, 0, 0, NULL);


With my_function executed in another thread. More about the CreateThread can be found here. I did not deal with multiple threads by now, so maybe I am still missing something here.

And perhaps as advice since this was posted in "Staring with Gamestudio": Usually other means to make your code faster are better and easier to accomplish than multithreading.
Posted By: faustf

Re: general questions about multitasking - 02/21/21 23:36

thanks for reply
© 2024 lite-C Forums