Results 1 to 10 of 10

Thread: QtConcurrent locking

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QtConcurrent locking

    Return the image from the concurrent function and use QFuture interface to set it onto the item in the main thread.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  2. #2
    Join Date
    Jun 2010
    Posts
    142
    Thanks
    11
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QtConcurrent locking

    how do I do that when I'll call QtConcurrent::run possibly hundreds of times before one of them finishes?

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QtConcurrent locking

    Store QFuture objects within your model (or anywhere else you want).
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  4. #4
    Join Date
    Jun 2010
    Posts
    142
    Thanks
    11
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QtConcurrent locking

    Why do QFutures contain lists (I thought that the concurrent function returns one value)?

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QtConcurrent locking

    There are variations of QtConcurrent calls that operate on containers and process each container element in separate threads.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. GUI locking problem
    By Benjamin in forum Qt Programming
    Replies: 6
    Last Post: 30th July 2012, 04:48
  2. Replies: 1
    Last Post: 10th October 2007, 10:11
  3. Locking all threads to one processor
    By chuckshaw in forum Qt Programming
    Replies: 0
    Last Post: 3rd July 2007, 19:14
  4. MySQL, locking tables
    By gunhelstr in forum Qt Programming
    Replies: 4
    Last Post: 6th September 2006, 02:00
  5. locking the combobox
    By jayw710 in forum Qt Programming
    Replies: 5
    Last Post: 10th May 2006, 16:12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.