Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-1282

[pthreads] QThread self.terminate() makes app not responding

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.15.1
    • 5.14.2
    • PySide
    • None
    • Linux/X11, macOS
    • 52f29458d7d6cb379d28d84021819516723d9169 (pyside/pyside-setup/5.14)

    Description

      In 5.14.2 my app is not responding in Windows when I set variable isrun = False:

      class AThread(QtCore.QThread):
          def run(self):
               while True:
                   if widget.isrun:
                       print("thread ping")
                   else:
                       self.terminate()
                   time.sleep(1)

      But without using variable isrun, just by mythread.terminate() - it's ok.

      Maybe it's because "terminate" is inside "while True", but before update it has been working.

       

      In 5.14.1 and 5.13.2 it's ok.
      Python 3.8.2, PySide2-5.14.2.1-5.14.2-cp35.cp36.cp37.cp38-none-win32.whl (from pip)
      Example related.

      Attachments

        1. ex5142.py
          1 kB
        2. pyside1282.py
          2 kB

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              crmaurei Cristian Maureira-Fredes
              novd V D
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes