Reputation: 2098
I am a little new to DJango and I am not quite sure how to handling locking of critical sections. I know Python has some great thread locking mechanisms I can use, but I don't know how well Django will support it. Will a production server fork multiple processes each with a container running my code, or will it just be in one container so a lock will work across all requests.
Upvotes: 0
Views: 516
Reputation: 1130
It depends on how Django is run on the server. As an app developer you can't know if your app will be run in a single process or multiple forked processes. Most standard setups I've seen use forking instead of threading.
Upvotes: 2