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.
Search Result
Collapse
8 results in 0.0043 seconds.
Keywords
Members
Tags
-
How to pause and resume a thread?
-
WPF(MVVM) Dispatcher object question
Hi,
I am writing a WPF(MVVM) application that would run a process in a background thread.
Here is the particualr method that is running on a different thread than the UI thread.
Code:private void ExecuteAsync() { IsRunning = true; for (int i = 0; i < 1000; i++) { App.Current.Dispatcher.Invoke(DispatcherPriority.Normal, new Action( () => TheTextCollection.Add(string.Concat(string.Format("{0}
-
mutual exclusion issue
hello ive got an application wich uses a collection in this case a queue from diffrent thereads
an object gets enqueued in one thread while anouther gets dequeued in a diffrent thread
these actions might accure simultaneously wich would resolve in an exception such as argument out of range exception , when the collections counter is being redifined.
now im looking for a "good looking" and right... -
Is multithreading the way to go?
Greetings,
This will be my first use of a multithreading application. I am attempting to create an application that will have a GUI for user input and configuration, communicate with a PLC via DDE or OPC communication, and communicate with a printer via serial communication.
For the PLC:
I will need to maintain a heartbeat (change a bit in the PLC every few seconds and wait up to 30 seconds to see it change back).... -
image download problem (python)
I was trying to download images with multi-thread, which has a limited max_count in python.
Each time a download_thread is started, I leave it alone and activate another one. I hope the download process could be ended in 5s, which means downloading is failed if opening the url costs more than 5s.
But how can I know it and stop the failed thread??? Thanks for your help!!!
I tried to use thread.join(tim eout),just... -
Multithread a treeview
Code:Public Class HTML5 Public DOMTree As New Windows.Forms.TreeView Public Sub AddDocumentNameNode(Byval Name As String) DOMTree.Nodes.Add(Name) End Sub Public Class Tags Public Class a Private WorkerThread as System.Threading.Thread Private _Path As String = "" Public Property Path As String Get Return _Path End Get Set(Byval
-
Cancelling previous thread
Greetings.
I have a program in VB2008 and I need to execute a thread from differents Subs.
Each time I start the thread I want to cancel the previous.
Here an example:
Code:Private Sub TextBox_Changed(ByVal sender As System.Object, ByVal e As System.EventArgs) Dim ThreadResults As New Thread(AddressOf ShowResults) ThreadResults.Start() End Sub Private Sub ckBoxAllRecords_CheckedChanged(ByVal
Last edited by Frinavale; Dec 10 '09, 05:07 PM. Reason: Please post code in [code] ... [/code] tags. Added code tags. -
Linux Wireless Network Testbed
Hi all,
I am writing a linux testbed for wireless sensor networks. The core objective is to test data transfer between any two nodes. The network runs using tree topology.
One node in the network is the "Driver". This node is connected using serial port to a linux PC. What I am trying to write is the software on this linux PC that will drive data transfer in the network.
The "Driver" node,...