在服务器处理上

Com*_*597 4 coldfusion

我有一个Web应用程序,它将使用提交的数据进行一些处理.而不是让用户等待至少几秒钟,或者在重负载期间可能长达几分钟,我想知道在coldfusion中是否有某种方法可以在服务器上进行处理.

基本上,数据将被传递到服务器,然后用户将被重定向回主页以允许他们做其他事情,但不一定能够立即看到结果.同时,数据的处理将在服务器上进行,并在完成时输入数据库.

这甚至可以在coldfusion中使用,还是我需要研究使用接收数据并将其作为单独程序处理的代码?

Ant*_*ony 6

ColdFusion 8引入了cfthread标签,可能对您有所帮助.

 <cfthread 
    required 
    name="thread name" 
    optional 
    action="run" 
    priority="NORMAL|HIGH|LOW" 
    zero or more application-specific attributes> 

        Thread code 

    </cfthread> 
Run Code Online (Sandbox Code Playgroud)