multithreading - Run two functions simultaneously without using pthread or other similar libraries -


i want run 2 functions simultaneously in c without using pthread or other libraries. delays in function shouldn't affect execution of other.

void func1(){      /*do something*/ }  void func2(){      /*do something*/ } 

how that? can provide algo.

there no way run functions simultaneously without using multiple threads. can simulate concurrent execution coroutines.

if there no platform restrictions better use multithreading. simple use pthreads or openmp if functions independent , there no data races.


Comments

Popular posts from this blog

html - Difficulties with background-image property -

visual studio code - What does the isShellCommand property actually do and how should you use it? -

ios - Segue not passing data between ViewControllers -