vsilaev/tascalate-async-await

Classloader stuff

superyuuki opened this issue · 3 comments

If i have a main project, compiled with async-await transformers, and another project loaded via main project's class loaders, does another project need to be compiled using async-await transformers too in order to be able to use async await features? Does it need it's own shaded copy of async-await or can main project share with it?

Also, how do scheduler and scheduler provider work? e.g. if i want some async method running in one executor and the next async to run in another

If i have a main project, compiled with async-await transformers, and another project loaded via main project's class loaders, does another project need to be compiled using async-await transformers too in order to be able to use async await features? Does it need it's own shaded copy of async-await or can main project share with it?

If both projects are using @async and alike stuff than you need:

  1. Both projects have a "compile" dependency on net.tascalate.async.runtime
  2. Each project uses maven build tools <artifactId>net.tascalate.async.tools.maven</artifactId> and <artifactId>net.tascalate.javaflow.tools.maven</artifactId> as described in README

If only one project has async features, then only this project uses build tools and a compile dependency on runtime. Others will get dependency to runtime transitively, and there is no inheritance of build tools.

Also, how do scheduler and scheduler provider work? e.g. if i want some async method running in one executor and the next async to run in another

Please open a separate issue and I will post different scenarios there and later collect all publications to docs.