How to implement a timer callback that executes in the same execution context

Posted by Waldorf on Stack Overflow See other posts from Stack Overflow or by Waldorf
Published on 2012-11-04T10:30:28Z Indexed on 2012/11/04 11:00 UTC
Read the original article Hit count: 124

Filed under:
|

Some programming environments like C++ builder have timer components with a callback function which executes in the same execution contexts as where the timer object is created.

I was wondering how to do something similar in plain c++ with threading. Or are there any other ways to have a callback which is periodically called to perform some task and runs in the same execution context as the calling thread?

© Stack Overflow or respective owner

Related posts about c++

Related posts about timer