title: Need to use lock or not?
body: <pre><code>class Session(list) :
  
          def __init__(self, session_file, laps_sound_file, end_sound_file, autoparse=True) :
  
              self.session_file = session_file
              self.laps_sound_file = laps_sound_file
              self.end_sound_file = end_sound_file
  
              self.cont_flag = threading.Event()
              self.cont_flag.set()
  
              if autoparse : self.parse()
  
          def start(self) :
  
              print("Entrainement Are going to start in : 10 sec\n" * 10)
              time.sleep(10)
  
              for action in self :
  
                  if not self.cont_flag.is_set() :
                      print('pause\n' * 10)
                      self.cont_flag.wait()
  
                  os.system('cls')
  
                  print(str(action) * 10)
                  winsound.PlaySound(self.laps_sound_file.split('.')[0], winsound.SND_FILENAME)
                  time.sleep(action.time)
  
              winsound.PlaySound(self.end_sound_file.split('.')[0], winsound.SND_FILENAME)
  
          def pause(self) :
              self.cont_flag.clear()
  
          def cont_session(self) :
              self.cont_flag.set()
  </code></pre>
  
  <p>i have 2 thread in my programm, the first thread is waiting console input and the second thread is executing <strong>start</strong> methode of class <strong>Session</strong></p>
  
  <p>the first thread is acting like a control panel on the session thread, there is the code :</p>
  
  <pre><code>while 1 :
      command = input("enter you're command : ").strip().lower()
  
  if command == 'exit' :
      break
  elif command == 'pause' :
      sess.pause()
  elif command == 'continue' :
      sess.cont_session()
  else : print('invalide command, please retry')
  </code></pre>
  
  <p>so i want to know if i must use a lock between :</p>
  
  <pre><code>if not self.cont_flag.is_set() :
              print('pause\n' * 10)
              self.cont_flag.wait()
  </code></pre>
  
  <p>and </p>
  
  <pre><code>def pause(self) :
          self.cont_flag.clear()
  </code></pre>