How to use threads in asp.net?

前端 未结 3 1719
清歌不尽
清歌不尽 2020-12-22 00:15

I have web forms application. On one form I have a few functions. Which are called syncronously and takes some time. So I need to call them in different threads.

Thi

3条回答
  •  感情败类
    2020-12-22 00:57

    You start new threads but don't wait for them to complete. Hence your page_load runs to completion since thread.start() is non blocking.

    Have a look at async/wait in the latest .NET version. It makes things a lot easier and predictable

提交回复
热议问题