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

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -