2. mbth callback refers to the callback function, a programming term.
There are always some interfaces between software modules, which can be divided into three categories from the way of calling: synchronous calling, callback and asynchronous calling. Synchronous call is a blocking call, and the caller will not return until the other party finishes executing it. This is a one-way call. Callback is a two-way calling mode, that is, when the interface is called, the callee will also call the other interface; Asynchronous call is a mechanism similar to message or event, but it is called in the opposite direction. When the service of the interface receives a message or an event, it will actively notify the client (that is, call the interface of the client).
Extended data
For general structured languages, callbacks can be realized by callback functions. The callback function is also a function or process, but it is a special function that is implemented by the caller himself and used by the caller.
In object-oriented languages, callbacks are implemented through interfaces or abstract classes. We call the class that implements this interface a callback class and the object of the callback class a callback object. For object languages compatible with process characteristics such as C++ or Object Pascal, it not only provides callback objects, callback methods and other characteristics, but also is compatible with the callback function mechanism of process languages.