3.4. How to request background computation

You will also notice the presence of a request_background_data() called in the constructor. This function, in eventhooks.c, does verify for the presence of the state information that could be precomputed by the main window background computation. If it has not been precomputed, we ask for a computation and show partial data. We also register a hook that will be called (notified) by the main window when the requested data will become ready, so the viewer can update itself with the new data. If no partial information would have made sense in a particular viewer, one could choose to shown a "waiting for computation" message while waiting for the notification. See lttvwindow/lttvwindowtraces.h for the API of the background requests.