is there a way to implement such a communication in C++?
use case:
my main program calls a function of my external library to process a list. every time the function iterates through the list it sends a ping to the caller. the latter uses the received signal to track progress of the former and sends back a boolean pong [true: okay, move on; false: the user wants to abort the process, return now].
will this be more efficient than iterating through the list in the main program and let the function only process a single item? or the whole idea is just crap?