Why do we need locks for threads, if we have GIL? : <p>I believe it is a stupid question but I still can't find it. Actually it's better to separate it into two questions:</p>

<p>1) Am I right that we could have a lot of threads but because of GIL in one moment only one thread is executing?</p>

<p>2) If so, why do we still need locks? We use locks to avoid the case when two threads are trying to read/write some shared object, because of GIL twi threads can't be executed in one moment, can they?</p>
