Basically, it means whether or not your current thread waits for something. Most usually an issue with GUIs. Consider the following:
Your user hits the 'export' button. Assume 'export' is a function that does a lot of computation and disk I/O, which for a processor that can handle 2 gig of instructions per second is classed as a 'slow' operation. If you made a blocking (synchronous) call to the export method, your application would wait until it had finished before unlocking to allow the user to do something else. For a GUI, this can mean that the user is locked out for the duration.
With a non-blocking (asynchronous) call, you are effectively saying "Start this operation now, but as I have two billion things I can be doing in the next second, I won't wait. Just notify me when it's completed." You can then continue processing, and check later to see if the operation has completed.
Does this help?
Steve
[small]"Every program can be reduced by one instruction, and every program has at least one bug. Therefore, any program can be reduced to one instruction which doesn't work." (Object:erlDesignPatterns)[/small]
Just for future reference in terms of locking - BitStreams also have a locking feature so that only your code can work on the stream until unlocked.
So take an image for example. You would open the image and when you are about to make a change to it (brightness or contrast etc) you would lock the bits, make your modifications and then unlock the image so that 2 people aren't applying different transformations at the same time.
You can imagine the horror of someone applying a brightness filter on an image while someone else is applying a color filter. You would have a screwed up looking image.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.