Content deleted Content added
Stevebroshar (talk | contribs) What was there was _wrong_; it is very much like a phone callback; it's just that people often use callback for function reference incorrectly |
Stevebroshar (talk | contribs) use phone links |
||
Line 10:
A callback can be likened to leaving instructions with a tailor for what to do when a suit is ready, such as calling a specific phone number or delivering it to a given address. These instructions represent a callback: a function provided in advance to be executed later, often by a different part of the system and not necessarily by the one that received it.
The difference between a general function reference and a callback can be subtle, and some use the terms interchangeably but distinction generally depends on programming intent. If the intent is like the [[callback (telecommunications)|telephone callback]] {{endash}} that the
== {{Anchor |TYPES}}Use ==
A blocking callback runs in the [[Execution (computing)|execution]] context of the function that passes the callback. A deferred callback can run in a different context such as during [[interrupt]] or from a [[Thread (computing)|thread]]. As such, a deferred callback can be used for synchronization and delegating work to another thread.
|