473,320 Members | 2,012 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

C#: threads

750 Expert 512MB
i have a prog... with 1 class... n say 10 funactions... i wanna have simultaneously execution of all of them... n then... i want to start another thread to write to a file.. how do i do this... assuming there will be some infinite loops... which i need to kill .. n restart...
Dec 28 '07 #1
4 932
CyberSoftHari
487 Expert 256MB
Speech English are not allowed in technical forms.
Note: Explain your problem detail.
Dec 29 '07 #2
RedSon
5,000 Expert 4TB
Speech English are not allowed in technical forms.
Note: Explain your problem detail.
Please use real English and do not use this pidgin English when writing your question. It is very rude for you to force everyone to decipher your encoded message.
Dec 29 '07 #3
PRR
750 Expert 512MB
First things First: my apologies to all... for being lol.. such an ass.... sorry i didnt ask my question properly....

Heres 3 functions:

public void dosomework()
{
/// do some clever things.... access some files: like c:\note.txt

}

public void morework()
{
////// again do some clever things.... access some files: like c:\note.txt
}


public void Lastfun()
{

}


main(0
{
thread t1,t2,t3;

t1 does dosomework()

t2 does morework()


after t and t2 completes t3 does Lastfun();

// till here its simple....
}
i want first t1, and t2 to do thier job.... then t3 is called... fine till here....
Now i want to monitor t1 and t2... so that they r not in some loop
// waitin for something.... or due to inavailability of resources
incase they r BUSY for more than some time.... i "kill" them.... Is there a better way of doing it? like saving what the thread did before gettin killed.. and what the thread was it waiting for?

Also i use timers to do the monitoring... Is there a better way?
Dec 30 '07 #4
CyberSoftHari
487 Expert 256MB
You can use delegates and multi threading. Study well about this and I hope you can solve your problem.
Dec 31 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Ronan Viernes | last post by:
Hi, I have created a python script (see below) to count the maximum number of threads per process (by starting new threads continuously until it breaks). ###### #testThread.py import...
0
by: Al Tobey | last post by:
I was building perl 5.8.2 on RedHat Enterprise Linux 3.0 (AS) today and noticed that it included in it's ccflags "-DTHREADS_HAVE_PIDS." I am building with -Dusethreads. With newer Linux...
6
by: m | last post by:
Hello, I have an application that processes thousands of files each day. The filenames and various related file information is retrieved, related filenames are associate and placed in a linked...
34
by: Kovan Akrei | last post by:
Hi, I would like to know how to reuse an object of a thread (if it is possible) in Csharp? I have the following program: using System; using System.Threading; using System.Collections; ...
3
by: bygandhi | last post by:
Hi - I am writing a service which will check a process and its threads for their state ( alive or dead ). The process has 5 .net managed threads created using thread.start and each have been...
10
by: [Yosi] | last post by:
I would like to know how threads behavior in .NET . When an application create 4 threads for example start all of them, the OS task manager will execute all 4 thread in deterministic order manes,...
6
by: RahimAsif | last post by:
Hi guys, I would like some advice on thread programming using C#. I am writing an application that communicates with a panel over ethernet, collects data and writes it to a file. The way the...
3
by: mjheitland | last post by:
Hi, I like to know how many threads are used by a Threading.Timer object. When I create a Threading.Timer object calling a short running method every 5 seconds I expected to have one additional...
10
by: Darian | last post by:
Is there a way to find all the thread names that are running in a project? For example, if I have 5 threads T1, T2, T3, T4, T5...and T2, T4, and T5 are running...I want to be able to know that...
4
by: tdahsu | last post by:
All, I'd appreciate any help. I've got a list of files in a directory, and I'd like to iterate through that list and process each one. Rather than do that serially, I was thinking I should...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.