一.问题描述 在Django视图函数中,导入 gevent 模块 import gevent from gevent import monkey; monkey.patch_all() from gevent.pool import Pool 启动Django报错: MonkeyPatchWarning: Monkey-patching outside the main native thread. Some APIs will not be available. Expect a KeyErr
下面为即将被调用的方法: public delegate int AddHandler(int a,int b); public class 加法类 { public static int Add(int a, int b) { Console.WriteLine("开始计算:" + a + "+" + b); Thread.Sleep(); Console.WriteLine("计算完成!"); return a + b; } } 同步调用: