puniverse / quasar

Fibers, Channels and Actors for the JVM

Home Page:http://docs.paralleluniverse.co/quasar/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

foreach和spring aop怎么处理

a1zhangyong opened this issue · comments

  1. foreach里面有异步需要挂起的方法, 测试下来目前是有问题的,请问需要怎么解决
  2. spring aop执行的时候报错
    public Object process(ProceedingJoinPoint joinPoint, BizLog[] bizLogs) throws Throwable {
    Context.setCurrent(new Context());
    Object proceedResult = joinPoint.proceed();
    List recordBizLogs = parseBizLog(joinPoint, proceedResult, bizLogs);
    logger.bizLog(recordBizLogs);
    return proceedResult;
    }

这种字节码增强的协程,对使用者的要求比较高。
1,foreach,手动挂起。
2,通过配置,告诉agent要修改spring-aop生成的类。
所以,你直接用虚拟线程就好了。jdk21之前就用kona,21和之后直接用jdk