Is this simple python code thread safe?
<p>I want to create a non-thread-safe chunk of code for experimentation, and this is the function that 2 threads are going to be called.</p>

<pre><code>c = 0

def increment():
  c += 1

def decrement():
  c -= 1
</code></pre>

<p>Is this code thread safe?</p>

<p>If not, may I understand why it is not thread safe, and what kind of statements usually lead to non-thread-safe operations.</p>

<p>If it is thread-safe, how can I make it explicitly non-thread-safe?</p>

<p>Thanks!</p>
