title: Python Game always crash or stuck | pygame
body: <p>I'm making a nice game with the <code>pygame</code> module, and basically I want to do two things:  </p>
  
  <ol>
  <li><p>Run the game in an endless loop and see if the user wants to close the game, and if he wants to close the game, pop him a MessageBox.  </p></li>
  <li><p>In the second function, I want to add all the features of the game and draw on the screen.</p></li>
  </ol>
  
  <p>My problem is that when I try to run them both with Thread, the game gets stuck and unresponsive.</p>
  
  <p>Is this a problem with my computer, meaning it's too weak to run the game?<br>
  Or is it a problem with my code that keeps the game from running properly?</p>
  
  <p><strong>Code:</strong></p>
  
  <pre><code>import pygame
  import ctypes
  from threading import Thread
  
  class Game:
      def __init__(self):
          self.init = pygame.init()
          self.screen = pygame.display.set_mode((800, 500))
          self.allProcess()
  
      def runGame(self):
          self.running = True
          while self.running:
              for event in pygame.event.get():
                  if event.type == pygame.QUIT:
                      ctypes.windll.user32.MessageBoxW(0, 'Thank you for Playing!', 'Thank You', 0)
                      self.running = False
  
      def items(self):
          self.screen.fill((255, 255, 255))
          pygame.draw.circle(self.screen, (0, 0, 255), (250, 250), 75)
  
      def allProcess(self):
          Thread(target=self.runGame).start()
          Thread(target=self.items).start()
  
  
  if __name__ == '__main__':
      ins = Game()
  </code></pre>