DEFINE "CALL BACK".

Mikki Halpin

Total Post:5

Points:25
Posted by  Mikki Halpin
 606  View(s)
Ratings:
Rate this:
  1. Mikki Halpin

    Post:5

    Points:25
    Define "Call Back".

        Synchronous operations are ones that happen in step with your calling code. Most of Cocoa works this way: you send a message to an object, say to format a string, etc, and by the time that line of code is “done”, the operation is complete.
        But in the real world, some operations take longer than “instantaneous” (some intensive graphics work, but mainly high or variably latency things like disk I/O or worse, network connectivity). These operations are unpredictable, and if the code were to block until finish, it might block indefinitely or forever, and that’s no good.
        So the way we handle this is to set up “callbacks”– you say “go off and do this operation, and when you’re done, call this other function”. Then inside that “callback” function, you start the second operation that depends on the first. In this way, you’re not spinning in circles waiting, you just get called “asynchronously” when each task is done.

      Modified On Apr-16-2016 02:01:12 AM

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!