7 Discussion / Question Topics

Remove Filter
Member Avatar for
Member Avatar for soo5Lo6k

Hi, I am programming some console application that updates itself periodically from Internet. (windows.h + pthreads for win32) I want to do something like: [CODE] MAIN FUNCTION: create thread launch updater THREAD: infinite loop - starts the main application, exits if application ended normally but when it was killed by …

Member Avatar for Ancient Dragon
0
1K
Member Avatar for arjunaw

In a unix pthreads based app I'm working on, I have objects of a particular class (call it class foo) being created in multiple threads. I need a specific public method of class foo invoked at or after 60 seconds of the object coming into existence (it is not imperative …

Member Avatar for arjunaw
0
4K
Member Avatar for shinsengumi

Can anyone help me improve my source code below? I tried fixing it but apparently, there's not much success. [CODE] #define NUM_THREADS1 1 void *go_to_website2(void *program); void *go_to_website1(void *program) { char* str[3]; str[0] = (char *)program; str[1] = "http://www.google.com"; //supposedly 2nd website to go to str[2] = '\0'; char* new_prog …

Member Avatar for sree_ec
0
892
Member Avatar for yuri1969

Hi, I would like to make an threaded app which would use pthreads. I made a linked list and I put references to running threads here. I know that operations of adding a new thread reference to the list and removing a thread reference from the list after the thread …

Member Avatar for yuri1969
0
171
Member Avatar for Danny_501

Hi all, Is there a way to make thread pools in POSIX pthreads? (using c) I could only find implementations for java and c++, but I need it to be in c. Thanks.

Member Avatar for gerard4143
0
157
Member Avatar for Danny_501

Hi all, I have a multithreaded program, one of the threads needs to listen for user input. I was wondering is there a way of checking for user input every few seconds or milliseconds, without having the thread hang on a fgets() function? Current I have: [CODE] while(keep_running == TRUE) …

Member Avatar for sree_ec
0
240
Member Avatar for Danny_501

Hi all, I'm making a miltithreaded program that uses the pthreads library. One of the threads monitors the users input. my problem is when I enter a close command I get the following error: 9 [sig]...: *** fatal error - called with threadlist_ix -1 make: *** [run] Hangup I know …

0
61

The End.