Pete Hall wrote:
Callbacks are procedures that are executed when something happens. For instance, it's common in some environments to specify a callback procedure to execute when a timer expires, or when a UI control grabs or looses focus.

Yes, callbacks are frequently used to call a procedure across a thread boundary. For example, in Java, calling most Swing UI methods from threads other than the Event Dispatch Thread is bad (as in "don't cross the streams" bad). So there are ways to request that a method be called in the Event Dispatch Thread, in which you pass your desired method call as a callback.


This thread ...


Return to Archive home page | Return to MIDRANGE.COM home page