Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QScriptEngine in a thread
Forum Updated to NodeBB v4.3 + New Features

QScriptEngine in a thread

Scheduled Pinned Locked Moved Unsolved General and Desktop
qscriptenginethread
2 Posts 2 Posters 1.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    SysTech
    wrote on last edited by
    #1

    Hi all,

    Is there any reason that a QScriptEngine could not be encapsulated and run (evaluated) in a thread?

    I am finding the scripts to be more than valuable with the only limitation being that my current implementation is foreground based making it tricky to evaluate more than one at a time.

    I am considering writing a thread host for my scripts with the ability to create a new thread and run the script in that thread with signals to notify when the script completes or throws an error.

    Any reason this should not work? Any considerations I'm missing? Obviously I need to thread protect some of my resources being used in the script and that is being done already for a number of reasons.

    Thanks in advance!

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      I haven't used that class but from the looks of it, using the worker object approach should be fine.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved