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
Post a Comment