190 Topics
| |
Hey guys, I'm interested in learning about simple multithreading in C++ for Windows. Does anyone have any reccommended tutorials/links thats quite good? | |
I'm simply trying to keep a log list for my application events. I'm trying to send text to the log from a seperate thread with the following code: Imports System.Threading Public Class Main Private worker1 As Thread Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load worker1 = New … | |
I am on OSx and I am trying to exit the program by pressing CTRL+C. but it seems like even if I have a signal handler registered in main thread it doesn't exit while the thread is executing on pressing CTRL+C. Here is a piece of cake where I am … | |
I am trying to establish a pause and play communication between threads.I am spawning two threads for two forms at the startup, one is the mainthread which is for mainwindow and second thread of form2, var thread = new Thread(ThreadStart); thread.TrySetApartmentState(ApartmentState.STA); thread.Start(); private static void ThreadStart() { Application.Run(new SecondForm()); // … | |
Hi, I have to create a program that creates N child processes, and they muliply the matrix. I have some base codes but when I try to run them they give me segmentation error and I cant find the problem. #include <stdio.h> #include <stdlib.h> #include <time.h> #include <unistd.h> #include <sys/types.h> … | |
I was following along to the following tutorial - [Derek Banas Java tutorial 18 - Threads pt2](http://www.youtube.com/watch?v=G2Xd5avyk_0) and as I decided to go over his tutorial series by following along in notepad++ and compiling with the command line, so that I can experiment and test things I'm unsure about, I … | |
Quick question, the answer is eluding me on the internet. Which is unusual. When we reference and call a sub/function from a class is it automatically started on a new thread or will it join the main thread? Cheers in advance. | |
Hello. I need to set up some pipes for a homework assignment as part of a bigger project. The issue I'm having is that the array (args) I'm using to populate the pipe arguments keeps segfaulting and I don't know why. Everything has been malloced beforehand and the faults only … | |
Hi, I have learned that servlet containers like tomcat handle concurrency in web application. I just want to get a clear comfirmation whether I dont have to multithread my business logic classes/methods(e.g database connections) when I am developing servlet applications. Cheers! | |
Hi members, This is a program i wanted to implement semaphore between parent and child processes which are trying to access a shared variable called counter ... i dont know why it is not getting incremented during the child process !! someone help please !! #include <stdio.h> #include <sys/types.h> #include … | |
Hi ya guys, I have been learning about forks and processes, below is my code that i have created but am having difficulty on certain things. **1. Add code to print out and note the values of :** i. The values held within the array fd[ ] from the parent … | |
Here is a code that creates two childern using fork. My question is how can we create mutiple grandchildern and great grandchildern at the same time . And the line 21 of code gives an unexpected output i.e instead on one parent id it gives three id's. Here is the … | |
I have a program with DataGridView which is bound to MS Access table. When I addept to update I get "Syntax error in INSERT INTO", but no explanation about the syntax error. Column names in the table have a space in them, such as "Last Name". Could that be the … | |
Further along in this code I'm trying to access processRow, which is of type DataRow, but I get a RowNotInTableException This row has been removed from a table and does not have any data. In an attempt to figure out when this data is getting deleted, I added a bunch … | |
| I was reading through Javascript overview on a webiste that stated following: 1) JavaScript can not be used for Networking applications because there is no such support available. 2) JavaScript doesn't have any multithreading or multiprocess capabilities. My Questions: 1) Which kind of 'Networking Applications' are we talking about? 2) … |
In a past prac. exam for an algorithm course I'm doing is the challenge below, and their are no solutions but it seems like a really interesting one to solve. Can someone please help and point me in the right direction, I would like to try this on my own, … | |
I've been asked to edit the code in this post http://www.daniweb.com/software-development/java/threads/455560/java-recursion-brute-force-sim so that it "Runs the function as a thread which wouldn’t then hang the program whilst it’s waiting for the result". I've looked it up, but I'm struggling to apply it to this program, any tips? | |
can anyone give me some good references or links or some guidelines to start with this ? i need to learn this. like i want to know how can i implement malloc, calloc, realloc etc. for this thing also, what do i need to learn firstly ? thanks. any kind … | |
Hi Folks, I am writing an app that involves Client -> Server -> Client communication (one way traffic). I have my data transmitted from client A to the server, simple to test, just print to console, however, I'm trying to test to see if the data has been sent on … | |
Hello, I have a course that is Operational Systems.. My lecturer doesnt explain so much and after He say, You must solve this problem, because u r a programmer.. I have such a problem with linux programming. I put my code here, He wants, I must allow multi-client to server. … | |
Hi All, In my script, i am trying to call multiple fork call. if i call less than 10 times, its working fine. If i call more than 20 or 30 times, most of the process getting time out or died foreach my $ttyport (@processTTY) { my $pid = fork();Inline … | |
So i'm trying to make multiple clients logon to a server through filesockets, and perform simple commands like ls -l, ls, mkdir. I've managed to make one client recieve output of ls -l command, sometimes, its buggy. Now i've been sitting for days trying to figure out how to fork() … | |
hi friends I've a code to compute integral with area function in code. I used Fork, and for returned values I must use shared memory. now I need to embed a semaphore in my code to control the critical area(here is shared memory). I don't know how to embed semaphore … | |
[B]!USING PYTHON 3.1![/B] Hello DaniWeb! Today I'm going to be posting a [B]simple[/B] threading tutorial. First of all, what is threading? Well, threading is just another way of doing a side task without interrupting the main program. Now here's a simple example. Let's say we are going to make a … | |
Okay I am trying to write a program where a parent process creates three child processes. Also waits for each of them to finish. Here is my code: [code] #include <stdio.h> #include <unistd.h> main() { int i; // create 3 child processes for (i = 0; i < 3; i++) … | |
Hi to all, I'm using the WIA Aut. Library [url]http://www.microsoft.com/downloads/details.aspx?familyid=a332a77a-01b8-4de6-91c2-b7ea32537e29&displaylang=en[/url] , trying to capture photos from 5 digital cameras (Nikon D90) USB-connected to my pc. Now, I partially achieved my goal, what I do is: - loop through the attached devices, connecting to every camera; - fotocamera.ExecuteCommand (WIA.CommandID.wiaCommandTakePicture) ; - … | |
Still playing with multi-threading and Prod-Con, at this point I've been at this for days. Would love some help debugging; thanks in advance. http://pastebin.com/jhHB9kTY - Main http://pastebin.com/BZSspf3x - Consumer http://pastebin.com/ndzAADJz - Producer http://pastebin.com/p7YdzH1D - Product http://pastebin.com/rxs3WzDT - Message http://pastebin.com/JR5ywgz1 - Utiliy 2 Producers, 4 Consumers Essentially Producers push a message … | |
**My academic assignmentt ** **Please help me in coding for this assignment** In Linux Ubuntu flavor, write a program in C language to do the following tasks. 1) Use fork ( ) system call to create a child process. 2) Child process should first take student name as input and … | |
I see this example frequently and thought I'd give it a shot but I've got something unexpected happening with my Queue. I have multiple threads utilizing my producer class but the output doesn't show that it is being written to by each thread. protected Queue<ProductMessage> prodQueue = new ConcurrentLinkedQueue<>(); @Override … | |
I'm applying the peterson solution for protecting memory of the critcal section. Each child process should contain a local variable that keeps track of the number of times it interrupts the other child while it is in its critical section. The process should display this value before terminating. I'm having … |
The End.