help me out with my threaded c++ mudbase - c++, pthread_cond_wait
hello,
in my free time i am writing on a c++ mud codebase, a while ago i decided that i would move to pthreads, so i could make use of smp. now i have a problem which i just cant fix - for weeks now. i have a main thread which spawns my threads, as soon as spawned they get a pthread_cond_wait, so all new threads are sleeping, until i signal them to wake and to my bidding - what is what they wont do. they just wont receive my pthread_cond_signal.
the important part of my code is this i guess:
you can take a look at the whole code here.
as you can see this is a more or less object oriented attempt. i think that maybe the pointer this->condition is different,when cond_wait uses it, and when cond_signal uses it. please help me out here, i am happy to provide every info and try every idea.
thanks for your attention,
sonicx
Dear All,
I run a website for a non-profit. Does anyone know where I can get free or cheap software to run threaded discussions for our website?
Our website is obviously running off a unix platform.
Thanks (4 Replies)
I need to modify my version of find in unix and get it to create and use two POSIX threads to carry out concurrent finding operations.
How do i get about doing this>?
If anyone could help me it would be much appreciated.
Thanx
Mariuca (1 Reply)
I am working on a merge sort of two files of integers, and am fuzzy on some of the logic\syntax. I need two threads, each of which will open a file, read its contents into an array, and then sort the array using qsort. One thread will operate on file f1.dat(10000 numbers) and leave its sorted... (0 Replies)
I have a Multithreaded program which is hanging on AIX.
OS Version: AIX 5.2 and thread library version : 5.2.0.75
We Initiate the process with 50 threads..when we are disconnecting from the process it hangs.There is lots of other stuff involved here.I am just sending the piece of the problem with... (0 Replies)
Please tell me about internal functionality of pthread_cond_wait(). How it works.
Whether it actually put the thread into sleep and do the context switch or use spin locking. (1 Reply)
I need to write a perl script to execute external programs and grab the output and return code. Each program should be killed if it has not completed within X seconds.
Imagine that the script goes something like this :
@commands = &get_commands();
foreach $cmd (@commands) {
$pid =... (4 Replies)
Hello, are any of the encryption programs capable of true multi-threading ? Friend of mine tells me that he's been running some testing on Fedora 11 and that the kernel doesn't support multi-threading at that level.
I've been looking into TrueCrypt, encfs and both calm to support... (0 Replies)
Hello, are any of the encryption programs capable of true multi-threading ? Friend of mine tells me that he's been running some testing on Fedora 11 and that the kernel doesn't support multi-threading at that level.
I've been looking into TrueCrypt, encfs and both calm to support... (1 Reply)
Hello All :
I write a .c program to test the exactually resource the memory leak
as follows:
1 #include <stdio.h>
2 #define NUM 100000
3 void *Thread_Run(void * arg){
4 //TODO
5 //pthread_datch(pthread_self());
6 int socket= (int)arg;
7 ... (1 Reply)
I have a single threaded bash script that I am using to create secgroup rules in openstack. The process to add the rules is taking forever. Any of you python gurus know how to convert this bash script into a thread python script? Thanks in advanced.
create-secgroup-rules.sh:
#!/bin/bash
cat ... (2 Replies)