Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-109091

Uncaught RuntimeError: Atomics.wait cannot be called in this context

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P2: Important
    • None
    • 6.4.0
    • Network: HTTP
    • None
    • WebAssembly
    • WebAssembly

    Description

      Prerequisite: Multithreading support for building Qt source code has been enabled.

      Configure compilation parameters in the project project pro file :

      QMAKE_LFLAGS += -s STACK_OVERFLOW_CHECK=1 -s ALLOW_MEMORY_GROWTH=1 -s PROXY_TO_PTHREAD=0 -s DETERMINISTIC=1 --profiling-funcs -g -s ENVIRONMENT=worker -s MODULARIZE=1 -s ALLOW_BLOCKING_ON_MAIN_THREAD=1 

      Encapsulate the http calling tool, and use the global request lock "QMutex requestMutex" to lock the functions calling the http interface in the tool, and process them into thread safe

      When I create multiple threads and use the http calling tool to execute calls, the following problems will occur:

      It seems that when the first thread enters and locks QMutex, when another thread comes in and finds that QMutex is locked, it notifies the browser by throwing an exception and discards the request

      Is there a good solution to this problem? At least support multithreading to use QMutex to deal with thread safety issues

      Attachments

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

        Activity

          People

            mikolaj.boc Mikołaj Boc (Inactive)
            jfccg JIEBIN CAO
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes