Callback (computer programming)
A function passed as data to and to be called by another function / From Wikipedia, the free encyclopedia
Dear Wikiwand AI, let's keep it short by simply answering these key questions:
Can you list the top facts and stats about Callback (computer science)?
Summarize this article for a 10 year old
SHOW ALL QUESTIONS
For a discussion of callback with computer modems, see Callback (telecommunications).
In computer programming, a callback is a function that is stored as data (a reference) and designed to be called by another function – often back to the original abstraction layer.
This article needs additional citations for verification. (September 2015) |
A function that accepts a callback parameter may be designed to call back before returning to its caller which is known as synchronous or blocking. The function that accepts a callback may be designed to store the callback so that it can be called back after returning which is known as asynchronous, non-blocking or deferred.
Programming languages support callbacks in different ways such as function pointers, lambda expressions and blocks.