357 Topics
![]() | |
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 :), … | |
Hi all buddies, I am the beginner for multithreading in C/C++. So, I copied some example from MSDN and tried to compile it as my first step. Currently I am using DEVC++ IDE. The error is like that: " [Linker error] undefined reference to `sprintf_s' ". Here is the program … | |
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 … | |
[CODE] import java.awt.*; import java.awt.event.*;//for specifying windows events import javax.swing.*; import java.lang.*; public class FrontE implements ActionListener,Runnable { JTextField jav,it,c; Frame f; JButton Submit; int aa,bb,cc,tot; float avg; FrontE() { f=new Frame("Progress Calculator"); JLabel l1=new JLabel("Enter the marks here:"); f.add(l1); Panel p=new Panel(); Panel p1=new Panel(); JLabel java=new JLabel("Java"); jav=new … | |
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 … | |
Hello Members, I am trying to multiply two matrices using multithreading. I get a NullPointerException on the line that is commented in Bold. Following is the entire code. Any input is much appreciated. [CODE]import java.lang.*; import java.io.*; public class Matrix_Mult extends Thread { static int a[][]; static int b[][]; static … | |
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 … | |
Hello All, I have a question regardind=g accessing shared resources. I have a for loop in which i am creating many threads.. And each thread at some point of time they call this function : [code] Public Function UpdateMailJobs(ByVal con As Data.DataRow, ByVal jobid As String, ByVal varName As String, … | |
I need to make a project that takes data from a uC through serial port and insert it in some databases. I want to take the data from 5 sensors, i'm sending the data from al 5 sensors once per hour. The problem is that I want to use backgroundworker … | |
Hey folks, recently I wrote a small application in java where it generates ip addresses in a 192.168.x.x block, and then proceeds to ping them to see if the address is available or not. The main issue with it right now is that it's extremely slow when I tested it … | |
I have a program that I would like to implement using Threading. I wand to load a form that takes a couple of minutes to open using threading. Here is my code [CODE] Imports System.Threading Public Class frmAdjustments Function LaunchForm() As Integer frmNewAdjustment.SetReceive(CurrentUser) frmNewAdjustment.Show() frmNewAdjustment.Hide() LaunchForm = Nothing End Function … | |
I am a complete begineer in this field [B]multithreading.[/B] I have searched the internet; came across these [B]POSIX[/B] and [B]BOOST[/B] things. I dont know how to start. Can anuone guide me..I had downloaded the BOOST library but I couldnt find anything regarding the POSIX([I]and ? is the pthread[/I]). Which to … | |
Hi Daniweb. I've been working on a project for quite a while, and posted many problems that I encountered on Daniweb. Thank you to all the users who helped me. Every single one of those problems where solved in less than 24 hours after posting on here. My project mostly … | |
Okay, so in all honesty, I began learning Python about 2 days ago, so this is a rather noobish question(well, I've programmed in other languages, so it's not THAT noobish), but I'm making an IRC bot and can't figure out how to make it so that a line of code … | |
What is the most comprehensive book/online source for multithreading? Thanks! | |
What is the most comprehensive book for multithreading? | |
I need to do a pretty standard dining philosophers setup for my class. (I assume most people on here know what this problem is... if not look here: [url]http://en.wikipedia.org/wiki/Dining_philosophers_problem[/url]) We need to have a variable number of philosophers between 2 and 8, and avoid deadlock and starvation. In my design, … | |
Hi, I have written a script that checks whether a line has been added to a file. Whenever, a line gets added to the file a thread is created to process that line. And if a certain conditions holds for that read line, the thread should sleep for 1h and … | |
I'll start by saying that I've solved the problem I had, I'm just trying to gain an understanding of exactly what caused it in the first place. Please note I'm cutting out as much middle-man code as I possibly can for understanding purposes. My program is currently setup so that … | |
Hello all I'm having a major problem with instantiating objects across threads in WPF. For example, if I have the following: [icode]Line l = new Line[/icode] I get the following error: 'InvalidOperationException: The calling thread must be STA, because many UI components require this.' While I understand that in general, … | |
one thread try to read from vector and another thread try to delete from vector how to do it | |
Hi. I am trying to write server side windows forms application that supports multiple clients. What I want is following: 1) I need an infinite while loop to accept new connections. In order to do that I start new thread which executes while loop. I can't execute while loop without … | |
Hello, How can 2 connected clients with one server can communicate each other in c#.. ???? | |
Hi, I want to know how i can use multithreading in vc++ . please give an example . thanks in advance | |
Hi, I have C# .net application which reads data from the serial port and launches a new thread to process the data when all data has been read (end of data is determined by timing constraints). I create a new object where the thread will run, copy the data that … | |
I have two questions one is kind of a newbie question and the other one is a little more advanced. I have been coding C++ off and on for the past couple of years as a hobby and a little for my EE classes. I usually in my class reference … | |
Hi, I have to do multithreading. In my case each thread should run in a specified timer interval given in a database. I tried a sample by storing the data in an xml file and reading them with linq to xml. But it seems all the thread takes the last … | |
Hello everyone! I am using python 2.6 on cygwin environment and wondering how could i prevent two python processes from writing to a file at the same time. The file that is shared between the python processes is an ini file and is accessed through ConfigObj module. The first python … | |
If i fork off a parent and want to fork of fthe child, can i pass new variables from the child to the "grand -child"? PL help me clear this concept. | |
I wasnt to fork from a parent and execute two perl codes simultaneously rot13.pl and pi.pl.I want to keep track of the pid's of both children. i am not aware how to do it within the system() cmd. I have written the code below. But something tells me I'm being … | |
![]() | Hello everybody! a few days ago, i read this post in the [URL="http://www.daniweb.com/forums/thread257510.html"]Advanced and Intermediate Projects[/URL]-Thread: [QUOTE]Create an operating system prototype/emulator in Python. You might research into various operating systems to get an idea for what to implement. Things you can implement: A login. A shell system. A explorer system … ![]() |
I am running a BackgroundWorker to make a call to a Web Service to obtain a list of Customers, and a list of Vat Rates. This is fine and works, but I am simply stuck passing this data through to RunWorkerCompleted so the form can be updated (these two sets … | |
We are creating a Who wants to be a millionaire style game in VB. Our server is pulling information such as questions and answers from a Access Database and sending them to the contestants (Clients). All transfer of information is directly from the server to each client. One of the … | |
I've written the code already, and it compiles, but gets the following runtime exception: [COLOR="Red"]java.lang.IllegalThreadStateException at java.lang.Thread.start(Thread.java:595) at threads.ThreadStarter.run(ThreadStarter.java:52) at java.lang.Thread.run(Thread.java:619)[/COLOR] I've higlighted the line that throws the exception. I have no idea what's wrong, my knowledge in threads is sadly lacking. If anyone could help me out it would … | |
Ok, so I wrote a very simple programme, just to practice multithreading. I know it can be coded better, but I'm still learning about this, so please be lenient. This is my code so far: [CODE]package threads; // Create a thread import java.io.File; class threads implements Runnable { // This … | |
This question may be somewhat trivial, but I'm stumped none the less. The goal is to create a 'selection box' on the screen such as for selecting units in an rts game. I'll just give the pseudo-code, its the idea that's important main loop is set up as such: [CODE] … | |
I am doing a project on a print spooler. I am using multithreading to support multiple clients. The problem is that I need another thread on the server side to take care of the printing by extracting jobs from a priority queue. If the queue is empty the thread must … | |
hi expert, i'm newbie for python, anywhere i'm learning from internet sample, i got doubt here, i found below sample for thread import threading def hello(): print "Hello" t = threading.Timer(2, hello).start() t = threading.Timer(2, hello) t.start() this working fine when run manually ( python thread.py) but i try to … | |
Hi everybody, I'm trying to make a program that goes through a directory and checks for broken links. Unfortunately it isn't working: [CODE] // Main.cs using System; using System.Collections.Generic; using Gtk; namespace LinkMonkey { class MainClass { public static void Main (string[] args) { bool cli = true; bool recursive … | |
Hi, I had a query whether Windows multithreading API throw any Synchronization exception. If I am sharing a STL string between threads and the string is not guarded,will there be any synchronization exception. Another query is does STL container throw exceptions apart from memory violation Thanks in advance :-) | |
Hello All... This is my first post so please be gentle with me and I will try to explain the issue I've been fighting with for 3 days. I am trying to update a gridview element from a different thread. This update task is part of an outer foreach loop … | |
hi, i have problems using exec(), I need to pass a set of numbers using exec to another program that is supposed to use them to calculate something,,, i dont know how to pass them any suggestions?? | |
Write a program to print * / * / * / * / * / * / * / using two child thread. One thread responsible for printing * and another for / | |
I have a static function that write to a log file . In my project I am already using multithreading , hense I m getting exception that 'process can't access file because it is being used by another process ' I want to mutex that code so that if one … | |
Hello Daniweb. [B]Scenario[/B] For a project we have to write a irc server. For this, we first wanted to investigate what kind of server architecture we should apply. (e.g. multithreading, multiplexing, multiprocessing etc.) We've written simple servers which implement different architectures. The servers basicially receive a message, and then send … | |
Hi all, I tried running the following code. [code] #! /usr/local/bin/python import threading import time print "Press any key to start timer!" input() threadBreak = False def TimeProcess(): while not threadBreak: print "How are you?" print (time.time() - startTime) startTime = time.time() threading.Thread(target = TimeProcess).start() input() threadBreak = True input … | |
In my program ,am using ThreadPool for threading. In which function creating progressbar is in one thread and function that changing visibility of progressbar is in another thread. then following exception occurring... [COLOR="Red"]Controls created on one thread cannot be parented to a control on a different thread[/COLOR] |
The End.