且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

当客户端浏览器关闭中断服务器端的Perl CGI脚本

更新时间:2023-11-27 22:17:34

您需要建筑师软件不同。使用某种形式的异步编程中,作业队列将做精,只能使用CGI程序放在一个队列中的作业。通过使用你已经提到的库使过渡。

You need to architect your software differently. Use some sort of asynchronous programming, a job queue would do fine, and use the CGI program only to put a job in the queue. Make the transition by using the library you have already mentioned.

您似乎不熟悉的概念,所以我推荐一个非常简单的: Qudo 。如果你发现它过于严格,切换到 Gearman的,我认为这是最流行的一种Perl的世界(参见接口 的Gearman :: XS 一>和 的Gearman )。

You don't seem to be familiar with the concept, so I recommend a very simple one: Qudo. In case you find it too restrictive, switch to Gearman, which I think is the most popular one in the Perl world (see interfaces Gearman::XS and Gearman).

TIMTOWTDI:如果你能对CGI.pm共提供了执行环境放弃,例如见催化剂的 RunAfterRequest

TIMTOWTDI: If you can give up on the execution environment provided by CGI.pm altogether, see e.g. Catalyst's RunAfterRequest.