title: Thread Safety in Python's dictionary
body: <p>I have a class which holds a dictionary</p>
  
  <pre><code>class OrderBook:
      orders = {'Restaurant1': None,
                'Restaurant2': None,
                'Restaurant3': None,
                'Restaurant4': None}
  
      @staticmethod
      def addOrder(restaurant_name, orders):
          OrderBook.orders[restaurant_name] = orders
  </code></pre>
  
  <p>And I am running 4 threads (one for each restaurant) that call the method <code>OrderBook.addOrder</code>. Here is the function ran by each thread:</p>
  
  <pre><code>def addOrders(restaurant_name):
  
      #creates orders
      ...
  
      OrderBook.addOrder(restaurant_name, orders)
  </code></pre>
  
  <p>Is this safe, or do I have to use a lock before calling <code>addOrder</code>?</p>