Results 1 to 3 of 3

Thread: Long term syncronous method calls to asyncronous because of GUI

  1. #1
    Join Date
    Aug 2011
    Posts
    38
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Long term syncronous method calls to asyncronous because of GUI

    What is best approach to convert synchronous C library method calls to asynchronous because they can take some time ? And this time GUI is frozen ... I know that best way is move library itself to asynchronous or move Qt based solution but this is not option ...

  2. #2
    Join Date
    Jul 2008
    Posts
    409
    Thanks
    9
    Thanked 53 Times in 51 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Long term syncronous method calls to asyncronous because of GUI

    Hi, you can call you library functions from an extra thread. This way the GUI thread would not block.

    Ginsengelf

  3. #3
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,420
    Thanks
    37
    Thanked 1,545 Times in 1,495 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Long term syncronous method calls to asyncronous because of GUI

    While I personally like the approach suggested by Ginsengelf due to having full control with a custom thread, it could also be possible to simply use QtConcurrent::run().

    Cheers,
    _

Similar Threads

  1. Replies: 1
    Last Post: 14th March 2014, 06:29
  2. Problem with Qt Netbeans, method calls
    By 0_Azerty_0 in forum Qt Programming
    Replies: 2
    Last Post: 10th April 2013, 16:36
  3. SQA Test Automation Engineer, Long Term Contract
    By kathleenrouse in forum Jobs
    Replies: 1
    Last Post: 17th March 2013, 17:10
  4. Replies: 0
    Last Post: 12th February 2013, 19:35
  5. syncronous call function from other thread
    By antikies in forum Qt Programming
    Replies: 5
    Last Post: 26th June 2011, 12:51

Tags for this Thread

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.