Web应用程序中的线程化 [英] Threading in Web App

查看:83
本文介绍了Web应用程序中的线程化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我在Web应用程序中创建一个新线程并且用户在

之前关闭浏览器这个长时间运行的线程已经完成,该线程是否会死掉?如果是这样的话,有没有

a的方法可以防止它死亡并保持线程运行直到

执行....没有重大的重新设计。


在任务管理中是否显示新线程?


谢谢

If I create a new thread in a web app and the user closes the browser before
this long running thread is finisihed, does the thread die? If so, is there
a way to prevent it from dying and keep the thread running till
execution....without significant redesign.

Do new threads show up in the task mgr?

Thanks

推荐答案

服务器没有与浏览器的持久连接。因此,客户端上发生的任何
对服务器都没有影响,除非它是一个请求。这就是Sessions超时的原因。无法知道

客户端浏览器何时关闭。


新线程未显示在任务管理器中。只显示顶级流程

线程。


-

HTH,

凯文斯宾塞

..Net开发人员

微软MVP

跟随者既不是b $ b也不是贷款人。


" Chris Fink" <章******* @ discussions.microsoft.com>在留言中写道

news:88 ********************************** @ microsof t.com ...
The server has no persistent connection to the browser. Therefore, anything
that happens on the client is of no consequence to the server, unless it is
a Request. This is why Sessions time out. There is no way to know when the
client browser has been closed.

New threads do not show up in Task manager. Only the top-level process
thread is displayed.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.

"Chris Fink" <Ch*******@discussions.microsoft.com> wrote in message
news:88**********************************@microsof t.com...
如果我在Web应用程序中创建一个新线程,并且用户在这个长时间运行的线程完成之前关闭浏览器
,该线程是否会死掉?如果是这样的话,
有一种方法可以防止它死亡并保持线程运行直到执行....没有重大的重新设计。

新的线程出现在task mgr?
谢谢
If I create a new thread in a web app and the user closes the browser before this long running thread is finisihed, does the thread die? If so, is there a way to prevent it from dying and keep the thread running till
execution....without significant redesign.

Do new threads show up in the task mgr?

Thanks



所以只是为了澄清一下,当浏览器关闭时,我的长时间运行的线程将会死掉。 />

" Kevin Spencer"写道:
So just to clarify, when the browser is closed my long running thread will die.

"Kevin Spencer" wrote:
服务器没有与浏览器的持久连接。因此,客户端上发生的任何事情对服务器都没有影响,除非它是一个请求。这就是Sessions超时的原因。无法知道
客户端浏览器何时关闭。

新线程未显示在任务管理器中。只显示顶级进程
主题。

-
HTH,
Kevin Spencer
..Net开发人员
Microsoft MVP
无论是追随者还是贷方都不是。

Chris Fink <章******* @ discussions.microsoft.com>在消息中写道
新闻:88 ********************************** @ microsof t.com。 ..
The server has no persistent connection to the browser. Therefore, anything
that happens on the client is of no consequence to the server, unless it is
a Request. This is why Sessions time out. There is no way to know when the
client browser has been closed.

New threads do not show up in Task manager. Only the top-level process
thread is displayed.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.

"Chris Fink" <Ch*******@discussions.microsoft.com> wrote in message
news:88**********************************@microsof t.com...
如果我在Web应用程序中创建一个新线程并且用户在
If I create a new thread in a web app and the user closes the browser
之前关闭浏览器


这个长时间运行的线程已经完成,线程死了吗?如果是这样,那么

this long running thread is finisihed, does the thread die? If so, is


一种防止它死亡的方法,并保持线程运行直到执行....没有重大的重新设计。

在任务管理中是否显示新线程?

谢谢
a way to prevent it from dying and keep the thread running till
execution....without significant redesign.

Do new threads show up in the task mgr?

Thanks




>所以只是为了澄清一下,当浏览器关闭时,我的长期运行的线程将会死亡。


只是为了澄清,服务器无法知道什么时候客户端浏览器已关闭
。让我们说你写了一封信给你的母亲,邀请她

前来参观。在寄完这封信之后,你决定为你的访问做好准备。

客厅。与此同时,你的母亲已经去世了。

她甚至没有收到你的来信,但你也没有收到她的任何信息,因为没有人发现她的身体。因为你有没有从你(现已去世)的母亲那里听到任何消息,你是否停止画你的

起居室?


- -

HTH,

Kevin Spencer

..Net开发人员

Microsoft MVP

跟随者既不是b $ b也不是贷款人。


" Chris Fink" <章******* @ discussions.microsoft.com>在留言中写道

新闻:12 ********************************** @ microsof t.com ...
> So just to clarify, when the browser is closed my long running thread will
die.

Just to clarify, the server has no way to know when the client browser has
been closed. Let''s say that you write a letter to your Mother, inviting her
to come for a visit. After sending the letter, you decide to paint your
living room in preparation for her visit. Meanwhile, your Mother has died.
She never even receives your letter, but neither do you receive any
information back from her, as nobody has discovered her body. As you have
heard nothing from your (now deceased) Mother, do you stop painting your
living room?

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.

"Chris Fink" <Ch*******@discussions.microsoft.com> wrote in message
news:12**********************************@microsof t.com...
所以只是为了澄清一下,当浏览器关闭时,我的长期运行线程将是
die。
Kevin Spencer写道:
So just to clarify, when the browser is closed my long running thread will die.
"Kevin Spencer" wrote:
服务器没有与浏览器的持久连接。因此,
客户端上发生的任何事情对服务器都没有影响,除非
是一个请求。这就是Sessions超时的原因。无法知道客户端浏览器何时关闭


新线程不会显示在任务管理器中。只显示顶级进程
主题。

-
HTH,
Kevin Spencer
..Net开发人员
Microsoft MVP
无论是追随者还是贷方都不是。

Chris Fink <章******* @ discussions.microsoft.com>在消息中写道
新闻:88 ********************************** @ microsof t.com。 ..
The server has no persistent connection to the browser. Therefore, anything that happens on the client is of no consequence to the server, unless it is a Request. This is why Sessions time out. There is no way to know when the client browser has been closed.

New threads do not show up in Task manager. Only the top-level process
thread is displayed.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.

"Chris Fink" <Ch*******@discussions.microsoft.com> wrote in message
news:88**********************************@microsof t.com...
如果我在Web应用程序中创建一个新线程并且用户在
If I create a new thread in a web app and the user closes the browser
之前关闭浏览器


这个长时间运行的线程已经完成,线程死了吗?如果是这样,那么

this long running thread is finisihed, does the thread die? If so, is


一种防止它死亡的方法,并保持线程运行直到执行....没有重大的重新设计。

在任务管理中是否显示新线程?

谢谢
a way to prevent it from dying and keep the thread running till
execution....without significant redesign.

Do new threads show up in the task mgr?

Thanks




这篇关于Web应用程序中的线程化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆