sedj, fail-fast is all about getting an error the when error occurs. Trying to cause the program to crash or throw or do something immediatly when a problem is encountered. As opposed to letting the system keep going (potentially propagating the error) so that when it does fail, it's in a part of the code that is seperated from the actual error.
A popular example is concurrent modification exception in collections, when it is modified, while an iterator is iterating.
Sometimes it might be ok to go on iterating, but it would be very hard to find the error, which could occur much later, and only in rare circumstances.
Fail-fast will allways throw an error, and help, to find the error early.
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.