I have a main loop which is fully data-driven: it has a blocking call to receive data and stores it as the 'most recent' (accessed elsewhere). Each piece of data has an associated lifespan, after which the data timesout and can no longer be considered valid. Each time I receive data I reset the timeout.
Unfortunately I can currently only test the data validity when the main thread is woken by the arrival of new data. I need to be able to trigger an event if/when the data expires, unless I receive new data in the meantime.
Please can anyone suggest a solution?
If it helps, I have Boost v1.33.1 installed - but cannot update to a more recent version.