mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-03-11 20:19:24 +08:00
1. 修改了Serein.Library中的ObjectPool工具类,提供了对象归还的默认处理方法(通过构造方法指定Action<T>委托)
2. 不再显式调用流程上下文的Reset()方法,而改为通过对象池调用 3. 同样的,对于同样使用了ObjectPool管理上下文的Serein.Proto.WebSocket项目而言,也进行了同2.一样的修改
This commit is contained in:
@@ -41,6 +41,9 @@ namespace Serein.Library
|
||||
FlowContextPool = new Utils.ObjectPool<IFlowContext>(() =>
|
||||
{
|
||||
return new FlowContext(flowEnvironment);
|
||||
}, context =>
|
||||
{
|
||||
context.Reset();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user