s1monw1 / KtsRunner

Library for executing .kts files from regular Kotlin code
204 stars 23 forks source link

Kotlin's ScriptEngine isn't thread safe #2

Closed MrPowerGamerBR closed 5 years ago

MrPowerGamerBR commented 5 years ago

This is more an PSA than anything else, I'm using KtsRunner on my project (very nifty tool btw! Thanks for creating it!) and I found out that, if you try loading two classes on different threads with KtsRunner at the same time... it will throw some very cryptic compilation exceptions.

To fix it I just made the engine not static.

s1monw1 commented 5 years ago

thanks, changed this in new version