arcticfox1919 / LuaDardo

A Lua virtual machine written in Dart
Apache License 2.0
172 stars 32 forks source link

Async support #27

Closed maks closed 11 months ago

maks commented 1 year ago

This adds the ability to call async Dart code from Lua.

Because of the way that async usage seeps through any code base (@munificent seminal article about it) meant that I needed to make quite a few changes to support this, but in my initial tests this now works. Actually I'd feel more confident about my changes not having broken anything else if there was an existing testsuite, but thats a separate issue 🙂

@arcticfox1919 I'm not sure how you feel about LuaDardo supporting this as this is a breaking change to the current LuaDardo api, but it would address #7 and I needed it for my project in order to be able to do things like sleep() functions in Dart that didn't block the thread in the current Isolate.