Open Luro02 opened 4 years ago
This is not possible right now, because TokenStream
does not implement Send
. Internally TokenStream
uses an Rc
instead of an Arc
, but this should change once the compiler supports parallel compilation.
https://github.com/rust-lang/rust/issues/59667
It might be worth to take advantage of multiple cores, when this macro generates code.
One easy way would be to use
rayon
as a drop in replacement. Forfor
-loops one could use the synchronization primitives from the standard library.This should definitely be an optional feature.