Search Result

Collapse
20 results in 0.0044 seconds.
Keywords
Members
Tags
thread
  •  

  • endazyar
    started a topic How to pause and resume a thread?

    How to pause and resume a thread?

    Hi all, I'm studying on a traffic simulation project right now. However i have problem with pausing the threads. Each car is considered as a thread in my app. When the simulation is running i want to pause it. Thread.suspend( ) method doesnt work, since i have to stop the thread from altering data. Let's say if there is a car on the road, and i click on pause button, the car should stay there.
    Any ideas ?

    Thanks in advance.
    See more | Go to post

  • RemusRigo
    started a topic update a few components from a thread
    in .NET

    update a few components from a thread

    I need a thread to populate a listview and to increase/update the values of two progress bars (in vb.net)

    For better understanding, the form looks like this:


    Can anyone help me out, I tried to use a backgroundworke r, something like this:

    Code:
       Private Sub btnGO_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGO.Click
          pbAction.Value = 0
          bgwProcess.RunWorkerAsync()
    ...
    See more | Go to post

  • alive
    started a topic Thread Not Working

    Thread Not Working

    Can somone tell me why richtextbox text is not changing?

    Code:
    public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
            }
    
            private void Form1_Load(object sender, EventArgs e)
            {
                Thread t = new Thread(rtb2);
                t.Start();
            }
    
            private
    ...
    See more | Go to post

  • How can I debug a form calling an openFileDialog?

    Gentle Advisors,
    I have a form where a button selects an image and passes it on a control of this form and an other one.
    I wanted to debug the statements but I got an error message at the source line
    Code:
    if (openFileDialog1.ShowDialog() == DialogResult.OK)
    :

    "Current thread must be set to single thread apartment (STA) mode before OLE calls can be made. Ensure that your Main function has STAThreadAttrib ute marked on it.
    ...
    See more | Go to post

  • Scottyous
    started a topic problem with multi-threading parameters ( C pthread )
    in C

    problem with multi-threading parameters ( C pthread )

    Hi, I'd like to create thread wich call one function
    this function takes a structure (2dArray) in its parameter and return another structure (Path).

    the prototype looks like this :
    Path function1 (2dArray);


    I have problems because the threads parameters are (void *(void *)) and return void*
    See more | Go to post

  • Showing "Work in progress" window while copying files

    Hi!

    I'm writing an application in which I'm copying a few files. It takes a while, that's why I would like to open a window which would say "Work in progress", so the user would know that copying is in progress and he should wait until it finishes. After finishing the copy-progress, the little notification window should close and let the user continue the work with the application.
    I tried to solve this, but when I...
    See more | Go to post

  • tdlr
    started a topic Solution for handling boost::thread with member functions
    in C

    Solution for handling boost::thread with member functions

    I'm using VC++ 2010 with Boost 1.43.
    I've just created a class that uses winsock to handle network communication. Now there's a method called "fillQueue" which is defined like this:
    Code:
    void fillQueue(NetworkQueueTS& nq);
    Problem is, the method enters an infinite while loop which fills the NetworkQueue with data. So it needs to be in an extra thread. The NetworkQueue class itself is already thread...
    See more | Go to post

  • phpuser123
    started a topic WHy my emulator blocks even when I use thread?
    in Java

    WHy my emulator blocks even when I use thread?

    I am trying some thread tuts in J2me and camee across this code on the Net. Whan I run it, the emulator blocks... What is the use of the thread when the application still blocks...And How do I make this work?

    Code:
    import java.io.IOException;
    
    import javax.microedition.lcdui.Command; import javax.microedition.lcdui.CommandListener; import javax.microedition.lcdui.Display; import javax.microedition.lcdui.Displayable;
    ...
    See more | Go to post

  • p vs np
    started a topic Unable to thread functionality
    in Java

    Unable to thread functionality

    Hi

    I'm trying out a simple threading application, wherein, I try to detect a list of Bluetooth users in the vicinity.

    In its implementation, I've got a Swings form, which contains a 'Start' button and a TextArea.

    On clicking 'Start', I look for the devices by calling a method detectData, which has an implementation of its own. When this happens, I ought to have a "Searching for devices..." message...
    See more | Go to post

  • Populate TreeView in Background worker

    In vb2005, I have to load a treeview control while loading the form so make the form loading more effective therefore I use Background worker to populate treeview. I tried treeview to pass by ref and faced the error “Cross thread operation not valid: Control” accessed from a thread other than the thread it was created on..”, which makes sense.
    Now I want to load treeview in background and return its object then assigning it : Is this...
    See more | Go to post

  • Send timeout message to parent thread without terminating parent thread

    I'm trying to setup a mechanism to read input from a source, but time out after 10 seconds of inactivity from that source. After the mechanism times out, I want to run some end processing on the input.

    I have 2 classes:
    1. Main thread.
    2. Timer class.

    Currently, the timer class times out like so:
    Code:
    public void timeout()
    {
    	System.err.println ("Output finished. terminating");
    ...
    See more | Go to post

  • aktor
    started a topic Thread not starting on some machines

    Thread not starting on some machines

    Hi guys,

    I have a weird issue here. I'm writing an automated backup program that, well, performs automated backups of set folders to a set location. It has a GUI and a Windows service. The service has a timer (system.timer) that checks every 10 seconds whether a backup needs to be performed. If it does, it fires a method in a public static class to start the backup.

    Now, this works fine on my PC, and on 2 other test...
    See more | Go to post

  • EARNEST
    started a topic Thread suspend and resume methods. Alternatives?

    Thread suspend and resume methods. Alternatives?

    Hello again, I would like to put my thread on hold and check the data that the threaded process' event passed to my other class. I am using suspend and resume methods, but the VS says they are obsolete. What should I do? Should I use Sleep with all the time incremental dynamic time slice or there are other ways?
    Thanks, EARNEST.
    See more | Go to post

  • desturrr
    started a topic Playing sound thread sync with other codes ?
    in Java

    Playing sound thread sync with other codes ?

    Hello all,

    I have small sized mp3 files that i can play via Java using JLayerPlayer that takes the address of mp3 files , JLayerPlayer objects can be played creating threads and starting. The problem is when i have for example 9 sounds and i want it them to play in consecutively , so i put them in for loop like:

    for(int i=1;i<mainNotaL ist.size()+1;i+ +)
    {
    neyBox1.arrange NeyImage(mainNo taList.get(i-1));...
    See more | Go to post

  • desturrr
    started a topic Are Threads Finished?
    in Java

    Are Threads Finished?

    for(int i=1;i<mainNotaL ist.size()+1;i+ +)
    {
    Thread currentThread=n ew Thread(porteImg s[i].getNotam().get SoundLayer());
    porteImgs[i].activate();
    porteImgs[i].repaint();

    currentThread.s tart();
    try {
    currentThread.j oin();
    } catch (InterruptedExc eption ex) {
    Logger.getLogge r(Ney1View.clas s.getName()).lo g(Level.SEVERE,...
    See more | Go to post
Working...