Results 1 to 7 of 7

Thread: SQL module and Thread-safe

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2010
    Posts
    23
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: SQL module and Thread-safe

    so when I use firebird embedded I cant write mutlithread program.

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanked 268 Times in 268 Posts
    Wiki edits
    20

    Default Re: SQL module and Thread-safe

    Multithreaded program: yes (you can have a database manager in a separate thread)
    Using multiple threads for the sql classes: no

    There's no reason to do that either since most databases are optimized to work in a certain way.

    If you want to add lots of data at the same time in a database, don't do this query by query. Start a transaction, fill the transaction buffer and then commit it in one go.

  3. #3
    Join Date
    Mar 2010
    Posts
    23
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: SQL module and Thread-safe

    Firebird team release 2.5RC3 version.
    In release note we can read:

    "The client libraries, including the embedded one, can now be used in multi-threaded applications without any application-level synchronization."

    so with this library can I use Qt sql classes (with one connection) in more than one thread?

  4. #4
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanked 268 Times in 268 Posts
    Wiki edits
    20

    Default Re: SQL module and Thread-safe

    No.

    This has nothing to do with the used database, but everything with Qt.

Similar Threads

  1. thread-safe
    By babymonsta in forum Qt Programming
    Replies: 0
    Last Post: 5th May 2010, 11:18
  2. Why is QMutex Thread Safe?
    By Kind Lad in forum Newbie
    Replies: 3
    Last Post: 22nd February 2010, 05:46
  3. About the QSound,is thread safe?
    By cspp in forum Qt Programming
    Replies: 0
    Last Post: 6th November 2009, 15:26
  4. Is a QProcess thread safe in Qt4?
    By Jay_D in forum Qt Programming
    Replies: 4
    Last Post: 1st September 2009, 17:38
  5. What makes something not thread safe?
    By tgreaves in forum Newbie
    Replies: 9
    Last Post: 20th February 2009, 21:16

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.