I am trying to start a method from my main() as a new thread with pthread: int main(int argc, char** argv) {
I have two threads in a producer-consumer pattern. Code works, but then the consumer thread will get starved, and then the producer thread will get starved.
When I use pthread in cocoa, and want to access cocoa control in pthread function(setBtnState), it doesn\'t work. What\'s the problem?
Does the the iPhone SDK allow fork() and pipe(), the traditional unix functions? I can\'t seem to make them work.
I\'m working on a simulation project using c++ on both windows and linux. There will be several thousand objects (Perhaps 3000-5000) in the simulation. In plan to have several threads performing acti
I am seeing pthread_create() fail with rc=12 (ENOMEM), on a 64-bit RHEL machine with 4GB of real memory. The \'top\' command shows the process is using 1G of virtual memory when thread creation fails.
When I call pthread_exit from main, the program never gets to terminate. I expected the program to finish, since I was exiting the program\'s only thread, but it doesn\'t work. It seems hung.
I am attempting to make the following call, PID = pthread_create(&t, NULL, schedule_sync(sch,t1), NULL);
I have a simple thread pool written in pthreads implemented using a pool of locks so I know which threads are available. Each thread also has a condition variable it waits on so I can signal it to do
I have to call one method in seperate thread (i am using posix thread)which updates some value after every 5 second for which have written below code.