multithreading - Is spawning a new thread risky in ASP.Net app -


In an ASP.NET app, it is OK to create a new thread in the form of the code below, or something Are hidden risks?

In this code, I am executing some code which takes a long time to execute this new spam thread as 2 to 5 minutes. A thread is not a background thread created.

I am thinking that there are many users who click on the button 'BTNLOnRunGuirst', it means that many new threads will arise, which is not a good thing but is not sure.

  Secure void btnLongRequest_Click (Object Sender, EventArgs e) {LongOps lo = New LongOps (); Thread T = New Thread (New Thread Start (Low Language)); T.Priority = ThreadPriority.Lowest; T.Start (); }  

Can you lose this task without any notice?

If you start eliminating thread-pool boundaries, many threads become a problem (not because you are using your own thread). Or, you are overloading the machine and some resources like CPU, memory (1MB stack size in each thread by default), discs or networks are tiring.

If you avoid those problems, then you are okay.


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -