.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Interview Question >> ASP.Net >> Post New Question Subscribe to Interview Questions

What the way to stop a long running thread ?

Posted By :shahin     Posted Date :May 29, 2009    Points :10   Category :ASP.Net 
System.Threading.Thread.Abort

You can also find related Interview Question to What the way to stop a long running thread ?  below: 

What the way to stop a long running thread ?

  
Thread.Abort() stops the thread execution at that moment itself. (More...)

There is an unnecessary process running on my system Searchprotocolhost.exe, which slow down the speed.
How to stop Searchprotocolhost.exe on WindowsXP?

  
Searchprotocolhost.exe is one of the reason to make your system slow. Following are the step(s) to stop this and make system fast.

1. Click Start -> Run or Press Windows + R
2. Type services.msc and press 'Ok' or click 'Enter'
3. Scroll down to find 'Windows Search' and double click
4. Stop the process

Another step to disable it from Startup:
5. Reapeat step number 1
6. Type 'msconfig' and press 'Ok' or click 'Enter'
7. Click on 'Startup' tab
8. Uncheck 'Windows Search' checkbox
9. Click Ok.

Restart your system.

To verify :
Open your TaskManager by pressing 'Ctrl+Alt+Del' and locate for Searchprotocolhost.exe in process tab. (More...)

How to abort a running thread in .NET?

  
Thread.Abort() stops the thread execution. (More...)

What is a Thread ?

  
A thread is the basic unit to which the operating system allocates processor time. (More...)

How can you reference current thread of the method ?

  
"Thread.CurrentThread" refers to the current thread running in the method."CurrentThread" is a public static property. (More...)

What's Thread.Sleep() in threading ?

  
Thread's execution can be caused by calling the Thread.Sleep method. This method takes an integer value that determines how long the thread should sleep. Example Thread.CurrentThread.Sleep(2000). (More...)

How can we make a thread sleep for infinite period?

  
You can also place a thread into the sleep state for an indeterminate amount of time by calling Thread.Sleep (System.Threading.Timeout.Infinite). To interrupt this sleep you can call the Thread.Interrupt method. (More...)

What is Thread.Join() in threading ?

  
There are two versions of Thread.Join :-
. Thread.join().
. Thread.join(Integer) this returns a Boolean value.
The Thread.Join method is useful for determining if a thread has completed before starting another task. The Join method waits a specified amount of time for a thread to end. If the thread ends before the time-out, Join returns true; otherwise it returns False. Once you call Join, the calling procedure stops and waits for the thread to signal that it is done.
Example you have "Thread1" and "Thread2" and while executing 'Thread1" you call "Thread2.Join()".So "Thread1" will wait until "Thread2" has completed its execution and the again invoke "Thread1".
Thread.Join(Integer) ensures that threads do not wait for a long time. If it exceeds a specific time which is provided in integer the waiting thread will start. (More...)

What is the difference between thread and process?

  
Thread - is used to execute more than one program at a time.
process - executes single program.
A thread is a path of execution that run on CPU, a process is a collection of threads that share the same virtual memory. A process has at least one thread of execution, and a thread always run in a process context. (More...)

Which system table holds the details of all the processes running on the Microsoft sql server?

  
The name of the system table is sysprocesses .

Select * from sysprocesses


Make sure you run this query in master database. (More...)

Difference between thread and process?

  
Thread - is used to execute more than one program at a time.
process - executes single program (More...)

How do you implement thread synchronization (Object.Wait, Notify,and CriticalSection) in C#?

  
You want the lock statement, which is the same as Monitor Enter/Exit: (More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

 
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.


Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend