190 Topics
| |
Hi all I'm designing a multithreaded application which has long running threads. I need to check some condititons in the main thread, interrupt the threads and end the program if the conditions are true. But i'm not sure if this is the correct/safest way. Here's my pseudo: [CODE]main() { boost::thread … | |
i have a background worker with a sleep method inside a method. (winforms) here is the code that is executed: [CODE] private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e) { BackgroundWorker worker = sender as BackgroundWorker; int[] makeSelfMoves = new int[4]; foreach (KeyValuePair<int, int[]> item in replay)// count should be more than … | |
Hi, I need to create a program to do a threaded merge sort (kinda), but in the meantime I am trying to pass a struct through the the Merge method (thread runs this method), but I keep getting seg faults. I am sure its something obvious, please help me out. … | |
Hi, I wanna traverse inside the file system by using threads and processes.My program has to assume the first parameter is either given as "-p" which offers a multi-process application or "-t" which runs in a multi-threaded way. The second parameter is the pathname of a file or directory. If … | |
I want to parse through a root folder which is entered by the user by using multi threading and multi processing at different versions.But how can I distinguish while I am parsing through a root folder whether the next is a folder or a file?To summarize I want to learn … | |
I am creating new thread everytime in the for loop .. but many times the loop takes the same filename and creates new thread. Doesn't Work: [code] foreach (string s in fileEntries) { t = new Thread(() => Shrink(s)); t.Start(); } [/code] I have tried individually for each file creating … | |
How to list all files in a folder including subfolder files. | |
Hi there, I'm working on a project which incorporates the following: [LIST] [*]Reading data from XML [*]Writing data to XML [*]Interpreting XML and passing the information to various places [/LIST] These are on different threads, and I've used a Mutex to make sure they don't try opening the main XML … | |
Hi all, I could really use some help with a multithreaded server/client application that I'm building. I'm first experimenting with basic concepts and then am going to implement the results within a larger application. However, I find myself stuck on a particular issue. Initially, I transfer a file from the … | |
This is a great example for a thread stop. Simple debugging trick for any looped process that needs the "e-brake" applied while making sure that the thread is working correctly. The idea is that you can manually stop a thread, to prevent that hanging sensation during any process. This works … | |
Hey I have a program that has a webBrowser navigate through a few pages, and when it gets to the last page I set it to navigate to, checks if there is a certain string on that page. I just switched my code around to use multithreading and now the … | |
Heey Guy's, I'm having trouble understanding the Threading within an application. I will try to explain the program: 2 forms 1 parent (Server) 1 child (Client) both screens run on local computer (no network is needed) The server generates a random number once I've pressed a button. The number must … | |
i'm wondering how to use a function named timer(); while executing another function at the same time??? can anyone help me with this?? i researched about threading but it's too complicated for me | |
Hi Everyone! I have here a queue: [CODE]my $qTool = Thread::Queue->new();[/CODE] I want to show all the elements that the queue contains. [CODE]my $qItem = $qTool->peek();[/CODE] The code above returns only either the head of the queue or an element at a specified index. Is there a way for me … | |
Hey, I was trying to make a program which displays two chars A and B on the screen. Using the WASD keys, it lets you move the A char around and using the arrow keys it lets you move the B char around. I wrote the following: [CODE]Module Module1 Dim … | |
Hello there, I'm new to C programming and am following a course in C. I've got an example code for piping. It's not a very hard code to understand. It goes like this: [CODE] #include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <string.h> #define READ_END 0 #define WRITE_END 1 const char … | |
Hi, I am using asp.net with SQL2008 facing a concurrent user issue, if 2 users launches the application and clicks save then it is allowing to save the record twice. I need to avoid saving duplicate record. How can i acheive this? 1 thing i thought of taking Modifiedat value … | |
hello everybody.. recently I'm doing attendance software connected multiple RFID devices, the device doesn't support seeking new input automatically, so I need to implement the loop to seek next card automatically, the read function takes 3 parameters. I did read from each devices but separately. I need to read from … | |
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 … | |
Hi guys, My group is having a software development project for our academics at a university. The software we want to develop is an inventory system which will be installed in a Local Area Network. We have decided to use Visual Studio C# (2005 or higher) as the front-end while … | |
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 … | |
Hi, I'm writing a large program but require Multithreading for this software. I've searched the web for just over an hour and now is just after midnight but still can't find anything simple. The only thing I saw that came close to what I need was at [URL="http://www.computersciencelab.com/MultithreadingTut1.htm"]http://www.computersciencelab.com/MultithreadingTut1.htm[/URL] but I … | |
Hi, I have some code which creates a PDF based on the data posted to the entry point page (print.aspx). When I run a page with multiple frames in, each accessing the main print.aspx and posting data etc. but for some reason each frame loads one at a time, rather … | |
Hi everybody! I am trying to use fork() and wait to perform a simple task with c++ but I have noticed that the performance is quite different from what I expected. [CODE] #include <unistd.h> #include <stdio.h> #include <stdlib.h> int main(int argc, char *argv[]) { int number = atoi(argv[1]); int i; … | |
Hi everyone. i have an issue with a server program i'm developing for a university project. The issue is the following: The server program i'm building uses shared memory and forks. However i have a problem as to how can i destroy the shared memory segments i've created. A simplified … | |
Hello I created the following project to show you guys how I plan to do things. But my main project will be bigger and will have multiple classes. I'm just trying to get this to work properly so I know I'm using good practice when coding. ok, lets begin :), … | |
I want to make a GUI application in which I want to do something continuously (i.e. in while loop) in a different thread, until the user presses a button. In this other thread, I am accessing GUI elements and hence I have to use [B]SwingUtilities.invokeLater()[/B] for this thread. But since … | |
Hi all, I am new to threading. I am trying to send HTTP Web Request using multi threading, I am not able to acheive what I need. My requirement is to send request to thousands of same or different websites and parse the response i get it from httpwebrequest. In … | |
Hello. I'm kinda new to C++ and want to play two beeps through the system speaker (PC) (Using Beep() of course) at the same time for a song I'm working on. I heard about multithreading, but, as i am only slightly experienced in c++, am having trouble understanding it. Could … | |
Hi, I have a problem with my form application that when I close it (using cross in top right), the whole program crashes indefinately. This has only recently become an issue when I introduced some invoke code for updating a label and picture box on my form I have an … |
The End.