使用CherryPy作为阻塞/非线程服务器,便于调试 [英] Using CherryPy as a blocking/non-threading server for easier debugging

查看:174
本文介绍了使用CherryPy作为阻塞/非线程服务器,便于调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可以使用CherrPy服务器作为阻塞/非线程服务器(为了更容易调试)。

Is it possible to use the CherrPy server as a blocking/non-threading server (for easier debugging?)

推荐答案

没有。 wsgiserver不仅启动了自己的一组工作线程(默认情况下为10),即使只指定了1个针对侦听套接字和1个线程的线程)。即使这不是真的,如果您使用CherryPy的其余部分(即引擎),则会在主线程的单独线程中运行该侦听器线程。

No. Not only does the wsgiserver start its own set of worker threads (10 by default, but even if you only specified 1 that's still 1 thread for the listening socket and 1 worker thread). Even if that were not true, if you use the rest of CherryPy (i.e. the engine), it runs that 1 listener thread in a separate thread from the main thread.

这篇关于使用CherryPy作为阻塞/非线程服务器,便于调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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