129 Topics

Member Avatar for
Member Avatar for xagutxu

Hello: I am trying to create an audio processor, and I have a program that creates some threads (in Windows). The "main" program creates the audio processor thread, and then creates the audio reader thread. I would like to know how the audio reader can tell the processor that the …

Member Avatar for Narue
0
244
Member Avatar for kk33

Hi all , I am having problem about killing multiple treads in my program at the same time, here is my code: [CODE] int main() { while(1) { i++; HANDLE thread =(HANDLE)_beginthread(TheThread, 0, NULL); if(i==10) break; } Sleep(3000); TerminateThread(thread,0); return 0; } [/CODE] now "TerminateThread(thread,0);" will only terminate the 10th …

Member Avatar for Ancient Dragon
0
237
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
231
Member Avatar for daudiam

I can't understand the following statement [QUOTE]The Hotspot VM now implements Thread.yield() using the Windows SwitchToThread() API call. This call makes the current thread give up its current timeslice, but not its entire quantum.[/QUOTE] given at [URL="http://www.javamex.com/tutorials/threads/yield.shtml"]http://www.javamex.com/tutorials/threads/yield.shtml[/URL] I understand that after a thread yields, other threads get a chance to …

Member Avatar for ~s.o.s~
0
672
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
163
Member Avatar for amit.hak50

Given that t1 is a reference to a live thread, which is true? A. The Thread.sleep() method can take t1 as an argument. B. The Object.notify() method can take t1 as an argument. C. The Thread.yield() method can take t1 as an argument. D. The Thread.setPriority() method can take t1 …

Member Avatar for ~s.o.s~
0
94
Member Avatar for flayer84

Could somebody help me? This function should call to [B]make_schedule(temp_lim)[/B] until the returned value "gap" satisfies me. I know for sure (same function in c++), that "gap < 1" takes up to 10k-15k runs, ... ,"gap < 5" takes ~fifty runs. But here in C# it goes to "not responding" …

Member Avatar for flayer84
0
188
Member Avatar for tnclark8012

Hi all, I'm having a bit of a problem implementing a GUI and have no experience in multi-threaded programming. Here's the what I need to do: -Open GUI with file chooser -After user has selected 2 files, return control back to Main, along with an array of the selected files/file …

Member Avatar for hanvyj
0
117
Member Avatar for Pokenerd

I know this is strange, but i have a simple syntax question. Right now I'm working with a thread in the following format. The use of "setDaemon" in the run function does not work, as you apparently must set Daemon before you start the thread. [ICODE]new Thread() { @Override public …

Member Avatar for Pokenerd
0
140
Member Avatar for mumar
Member Avatar for Anuradha Mandal
-3
71
Member Avatar for wiggerboi95

hey everyone, i am a new developer using the bluej IDE on mac 10.6. Whenever i use the virtual terminal to execute, it works perfectly. the other day, i attempted to export the file to a JAR file through the programs basic functionality, as JAR files are natively run on …

Member Avatar for NormR1
0
231
Member Avatar for hemal1972

[B]Hi Guys, right now i am making accounting software project. In this project, i have used one list box for storing accounting groups. now here is a problem. I have stored 50 groups. But, I can see only 30 groups at a time. to see another 20 groups i have …

Member Avatar for meeni
0
114
Member Avatar for Erco21

Hi! I want to run multiple threads at the same time, and each thread has foreach loop accessing a listbox, so each thread checks every item in listbox, instead that each thread checks only one item, or skip an item if it has already been checked by other thread. Now, …

Member Avatar for Erco21
0
110
Member Avatar for steveh000

Hi I wonder if someone could point me in the right direction, I have two class`s in my program one is a search thread the other is the swing gui. I want to send updates and info from the thread to my gui but have not got any idea on …

Member Avatar for steveh000
0
101
Member Avatar for chintan_1671

I want to run a function just for specific time (say 10 min). After specific time it will return successful if it is able to execute the function successfully or unsuccessful. The function does a large amount of data processing and updating the tables. I want to stop executing that …

Member Avatar for chintan_1671
0
132
Member Avatar for gianks

Hi all, i've to make an introduction of what am i doing before start making questions. The goal of my work is to create an application quite like an IDE, for specific program development ( always in C++ ) and testing. Since the need of execute these programs under the …

0
129
Member Avatar for Dudeman3000

So I have a method that gets a Dictionary of `List&lt;myObj&gt;`, then cycles through the keys of the dictionary and passes each `List&lt;myObj&gt;` to a separate thread. Here is some Code / Psuedo-Code: public static void ProcessEntries() { Dictionary<string, List<myObj>> myDictionary = GetDictionary(); foreach(string key in myDictionary.keys) { List<myObj> myList …

Member Avatar for nick.crane
0
147
Member Avatar for hasrule

Hi, I was working on thread pool, which I used std::vector to implement the pool. [CODE] private: std::vector <handlerthread*> _pool; handlerthread* temp; void threadpool::addWorker() { handlerthread *temp; temp = new handlerthread(this); int x=_pool.size(); temp->start(&x); _pool.push_back(temp); } handlerthread* threadpool::getIdleWorker(){ int idx=-1; for (int i=0;i<_pool.size();i++){ temp=(handlerthread*)_pool[i]; //SIGSEGV HERE if(temp->isIdle()){ idx=i; break; } …

Member Avatar for mike_2000_17
0
685
Member Avatar for jjiceman

Hi, I'm developing an application, with a main GUI and another GUI that gathers some information. Upon clicking a button in the main GUI, it initializes a second GUI object that has fields for input and then an "OK" button. I need to be able to return the information in …

Member Avatar for JamesCherrill
0
218
Member Avatar for Oritm

Hi all, I'm programming an iphone app that uses an xml parser: I got 2 classes: DataManager and XMLParser. the XMLParser class is delegated so i can use functions like parserDidEndDocument. Now in the class DataManager, i call a function in the XMLParser: [CODE]XMLParser *xml = [[XMLParser alloc] init]; NSMutableArray …

0
82
Member Avatar for reza.adinata

Hi all, I am trying to build a ui application with thread for tcp server. I managed to build the tcp server itself using console (giving a welcome message when I telnet it), but when I copy the exact source code in WPF , I can not telnet it. The …

Member Avatar for reza.adinata
0
322
Member Avatar for gaudi_br

Hi, We've got an application running on Tomcat and we've setup Manage Engine's Applications Manager 9.0 to monitor our environment. I've set an alarm that fires whenever a thread is in the "BLOCKED" state at the moment of the polling and I'd like to get a thread dump of that …

0
97
Member Avatar for P00dle

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 …

Member Avatar for P00dle
0
136
Member Avatar for d.devendran

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 …

Member Avatar for jcao219
0
155
Member Avatar for icgc

Hi I have a static collection class being observed by a number of observers. The objects in the collection are updated when events occur in a 3rd party application and to which the class subscribes. I inform the observers about any changes to the collection, or objects within the collection, …

0
95
Member Avatar for Blaine Tuisee

I have been running this application for some time and have just recently begun to receive this error message. I would be eternally grateful if someone could shed some light on what causes this error or it's possible sideffects. [CODE]04/27/2010 00:06:16.016 [ERROR] com.ghd.domain.GHSessionFactory.createSession(GHSessionFactory.java:129) - An open thread session is being …

0
98
Member Avatar for mamutu

Hello all, This is my first post and I am counting on the experience of all of you to get some help :) I am working on a C# project and my program has to start different other applications, one by one. When an application finishes it's execution, I want …

Member Avatar for kvprajapati
1
168
Member Avatar for anjal_pawar

Write a program to print * / * / * / * / * / * / * / using two child thread. One thread responsible for printing * and another for /

Member Avatar for MaraShyla
0
166
Member Avatar for Unitaren

Hello, This is my first post to the community. I have never really been one to ask of much help but I am stumped. I was asked to asked to write a word count program that received input from a scanner object. The input could consist of one or more …

Member Avatar for Unitaren
0
5K
Member Avatar for Krytikal

Alright... so I found numerous examples on the proper way to suspend and pause threads but none really relate to my problem. I have a thread which runs in the background of my game which does all the simulation of moving players, calculating spaces and ect... I have a pause …

Member Avatar for Diamonddrake
0
556

The End.