pthread hanging

This is a discussion on pthread hanging within the C Programming forums, part of the General Programming Boards category; hi all i am doing a gui application using pthread if i do like this my application is not hanging. ...

  1. #1
    Registered User
    Join Date
    Dec 2006
    Posts
    136

    pthread hanging

    hi all
    i am doing a gui application using pthread
    if i do like this my application is not hanging.
    Code:
          pthread_t thread;
          gint  iret1;
          iret1=pthread_create( &thread, NULL, write_data, NULL);
    and if i do like this my application is hanging
    Code:
          pthread_t thread;
          gint  iret1;
          iret1=pthread_create( &thread, NULL, write_data, NULL);
          pthread_join( thread, NULL );
    and also what is the deference b/w
    pthread_exit(NULL) and
    pthread_exit(0);

    but i need to join the thread.
    can you help me

    how can i solve this problem

    thank you in advance

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,824
    pthread hanging
    double post.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. pthread question
    By quantt in forum Linux Programming
    Replies: 7
    Last Post: 04-07-2009, 02:21 AM
  2. pthread hanging
    By munna_dude in forum C Programming
    Replies: 7
    Last Post: 05-17-2007, 09:51 AM
  3. The Pthread Hell
    By matott in forum Linux Programming
    Replies: 1
    Last Post: 04-10-2005, 06:59 AM
  4. pthread priority
    By condorx in forum C Programming
    Replies: 2
    Last Post: 04-02-2004, 08:54 PM
  5. pthread create and join problems
    By rotis23 in forum C Programming
    Replies: 1
    Last Post: 10-11-2002, 09:41 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21