Threading in ASP.NET

Discussion in 'ASP .Net' started by walterd, Jun 23, 2005.

  1. walterd

    walterd Guest

    Hi

    I have searched the net and all multi-threading examples are for Windows
    Forms.
    I have multiple long running processes, some run for more than four hours.
    I start them simultaneously as they can run in parallel. I want to be able
    to stop them
    when I want to. I create threads for each as I don't want the page to
    freeze.
    Is there a way that I can keep track of each thread and be able to kill it
    when I want to?
    ThreadPool don't give me that possibility, and because it's a web page,
    every postback re-initialise the class.

    Your help is highly appreciated.
     
    walterd, Jun 23, 2005
    #1
    1. Advertising

  2. walterd

    Sean M Guest

    Having read the ASP.NET Performance article from patterns and
    practices[1], I would strongly recommend against using manually-created
    threads from within classes derived from Page. There's just too much of a
    performance hit involved.

    Is there any possibility your long-running processes could be
    implemented as a web service that the page could call? Perhaps queued for a
    separate Windows Service that runs in the background? This would avoid any
    icky interactions with the thread pool that the ASP.NET worker process uses.

    [1] http://msdn.microsoft.com/library/en-us/dnpag/html/scalenetcheck03.asp

    Cheers,

    Sean M

    "walterd" <> wrote in message
    news:...
    > Hi
    >
    > I have searched the net and all multi-threading examples are for Windows
    > Forms.
    > I have multiple long running processes, some run for more than four hours.
    > I start them simultaneously as they can run in parallel. I want to be able
    > to stop them
    > when I want to. I create threads for each as I don't want the page to
    > freeze.
    > Is there a way that I can keep track of each thread and be able to kill it
    > when I want to?
    > ThreadPool don't give me that possibility, and because it's a web page,
    > every postback re-initialise the class.
    >
    > Your help is highly appreciated.
    >
    >
     
    Sean M, Jun 23, 2005
    #2
    1. Advertising

  3. walterd

    Patrice Guest

    You may want to consider alternative such as
    http://www.15seconds.com/issue/031202.htm

    Patrice

    --

    "walterd" <> a écrit dans le message de
    news:...
    > Hi
    >
    > I have searched the net and all multi-threading examples are for Windows
    > Forms.
    > I have multiple long running processes, some run for more than four hours.
    > I start them simultaneously as they can run in parallel. I want to be able
    > to stop them
    > when I want to. I create threads for each as I don't want the page to
    > freeze.
    > Is there a way that I can keep track of each thread and be able to kill it
    > when I want to?
    > ThreadPool don't give me that possibility, and because it's a web page,
    > every postback re-initialise the class.
    >
    > Your help is highly appreciated.
    >
    >
     
    Patrice, Jun 24, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Lea Heart

    Why is threading a problem in ASP.Net ?

    Lea Heart, Aug 28, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    342
    Jerry III
    Aug 29, 2003
  2. Lea Heart
    Replies:
    1
    Views:
    446
    Steve C. Orr, MCSD
    Aug 28, 2003
  3. Replies:
    9
    Views:
    1,104
    Mark Space
    Dec 29, 2007
  4. Steven Woody
    Replies:
    0
    Views:
    454
    Steven Woody
    Jan 9, 2009
  5. Steven Woody
    Replies:
    0
    Views:
    470
    Steven Woody
    Jan 9, 2009
Loading...

Share This Page