190 Topics

Member Avatar for
Member Avatar for xyzt

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 …

Member Avatar for thekashyap
0
172
Member Avatar for NewOrder

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 …

Member Avatar for NewOrder
0
294
Member Avatar for John Linux

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. …

Member Avatar for pseudorandom21
0
891
Member Avatar for virtue

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 …

1
143
Member Avatar for virtue

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 …

Member Avatar for Ancient Dragon
0
172
Member Avatar for chintan_1671

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 …

Member Avatar for chintan_1671
0
200
Member Avatar for horserider
Member Avatar for CJdamaster

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 …

Member Avatar for CJdamaster
0
164
Member Avatar for initialise

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 …

Member Avatar for initialise
0
169
Member Avatar for zinnqu

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 …

0
3K
Member Avatar for ezbaiby

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 …

Member Avatar for ezbaiby
0
824
Member Avatar for RonaldvanMeer

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 …

Member Avatar for Momerath
0
216
Member Avatar for trust_noone

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

Member Avatar for Trentacle
0
90
Member Avatar for gutchi

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 …

Member Avatar for d5e5
0
245
Member Avatar for SoulReaper1680

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 …

Member Avatar for SoulReaper1680
0
156
Member Avatar for JDevelop

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 …

Member Avatar for JDevelop
0
165
Member Avatar for lbmanikandan

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 …

Member Avatar for kvprajapati
0
231
Member Avatar for Hassan_w

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 …

0
99
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
911
Member Avatar for tooqt4u_777

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 …

Member Avatar for dValue
0
589
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 shinsengumi
0
198
Member Avatar for cwarn23

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 …

Member Avatar for Ancient Dragon
0
707
Member Avatar for mikesowerbutts

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 …

0
155
Member Avatar for tikoti

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; …

Member Avatar for tikoti
0
3K
Member Avatar for SpyrosMet

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 …

Member Avatar for SpyrosMet
0
199
Member Avatar for arya6000

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 :), …

Member Avatar for Momerath
0
131
Member Avatar for daudiam

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 …

Member Avatar for daudiam
0
1K
Member Avatar for thecreators

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 …

0
80
Member Avatar for nimaid

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 …

Member Avatar for Fbody
0
243
Member Avatar for tomprice0189

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 …

Member Avatar for Diamonddrake
0
973

The End.