Results 1 to 4 of 4

Thread: problems with Threads.

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2009
    Posts
    7
    Qt products
    Platforms
    Unix/X11

    Default problems with Threads.

    how can i run ThreadA and block it and then run ThreadB and block it and again run ThreadA and block it.... upto 5 times

    I run two threads A and B simultaniously in my 'thereadmain.cpp' and i run two threads upto 5 times in thread.cpp. now my required output is
    A
    B
    A
    B
    A
    B
    A
    B
    A
    B
    But Its Prints : Thread A
    and Finished ,
    Finished.
    is it possible to print my required output through semaphores..
    i want to reun the above program without using sleep().
    Attached Files Attached Files

Similar Threads

  1. Replies: 8
    Last Post: 27th March 2013, 11:51
  2. Why do some QWidgets create own threads?
    By donglebob in forum Qt Programming
    Replies: 5
    Last Post: 6th July 2010, 17:01
  3. canonicalFilePath() thread problems
    By magland in forum Qt Programming
    Replies: 10
    Last Post: 5th December 2007, 21:22
  4. Problems with threads and windows
    By SkripT in forum Qt Programming
    Replies: 15
    Last Post: 16th January 2006, 17:46

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.