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. Is QFuture assign operator thread-safe?
Qt 6.11 is out! See what's new in the release blog

Is QFuture assign operator thread-safe?

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 592 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.
  • Z Offline
    Z Offline
    ZaQQQ
    wrote on last edited by
    #1

    According to documentation all QFuture methods are thread-safe, except const_iterator.
    I reviewed sources to make sure and found that assign operator implementation has no locks at all.
    https://qt.gitorious.org/qt/qtbase/source/c8172953ed6d3776178b9a37c0773d648cfdd9f2:src/corelib/thread/qfutureinterface.cpp#L425
    Is it bug or expected behavior? Do I have to guard QFuture in my code?

    Thank you.

    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