Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qt main thread blocked on pthread_join() causes strange result

Qt main thread blocked on pthread_join() causes strange result

Scheduled Pinned Locked Moved Mobile and Embedded
2 Posts 1 Posters 1.5k 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.
  • A Offline
    A Offline
    AlterX
    wrote on last edited by
    #1

    Hello,
    my app starts some posix threads and then, in particular circumstances, the Qt main thread goes in pthread_join to wait for another thread terminates its life (and do somethings). In this case, Qt main thread
    got stuck and never got woken up on meego harmattan. If I do the same but step by step under debug Qt main thread goes correctly and get released from within pthread_join call....
    It seems like Qt main thread blocked on pthread_join (while posix thread terminate) causes a freeze of the entire app (posix thread never terminates like it is frozen too)...during this stage if I force termination using stop button of QtCreator, all sequences (printing those with qDebug) are shown correctly!

    Someone knows how I can get rid of this Qt related thread problem?

    Qt Ambassador
    Real-time cooperative teams: http://www.softairrealfight.net
    Free Real-time network platform sdk: https://github.com/AlterX76/Solomon

    https://codereview.qt-project.org/...

    1 Reply Last reply
    0
    • A Offline
      A Offline
      AlterX
      wrote on last edited by
      #2

      It's very strange, but I've discovered that on Harmattan, if I close a socket, it never emits EINTR on native thread blocked on that socket.
      This prevent pthread_join call from being never woken up...
      I have resolved right now using sigalrm that seems to work.

      Qt Ambassador
      Real-time cooperative teams: http://www.softairrealfight.net
      Free Real-time network platform sdk: https://github.com/AlterX76/Solomon

      https://codereview.qt-project.org/...

      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