1.

What Is A Thread-local Object In Flask?

Answer»

FLASK uses THREAD local objects internally so that user don’t have to pass objects around from function to function within a REQUEST in order to stay threadsafe. This approach is useful, but it requires a valid request CONTEXT for dependency injection or when ATTEMPTING to reuse code which uses a value pegged to the request.

Flask uses thread local objects internally so that user don’t have to pass objects around from function to function within a request in order to stay threadsafe. This approach is useful, but it requires a valid request context for dependency injection or when attempting to reuse code which uses a value pegged to the request.



Discussion

No Comment Found