Google News
logo
Flask - Interview Questions
What do you mean by Thread local object in Flask?
In Flask, thread-safety has been provided out of the box. We can use objects such as current_app, g, and request without worrying about problems related to locking and concurrency. Moreover, we need not pass objects from methods to methods, and these objects are generally available within a valid request context.
 
This attribute of Flask makes it a bit unique and provides a lot of convenience to the Flask developers while keeping Flask application thread-safe.
Advertisement