-
-
Notifications
You must be signed in to change notification settings - Fork 90
Open
Description
Hello, I was experimenting with your library and noticed yielding does not seem to work on .NET 9, it seems to work on .NET 8 though. Are there any plans for supporting .NET 9? On .NET 9 its throwing runtime exceptions so I assume its something microsoft changed with delegates.
The code I used for my test is
static void Main(string[] args)
{
var l = new Lua();
l.Register("yieldTest", TestFunc);
var c = l.NewThread();
if(c.LoadString("print('hello world!!');yieldTest();print('after yield!!');") != LuaStatus.OK)
Console.WriteLine(c.ToString(-1));
else Console.WriteLine("successfully loadedstring");
Console.WriteLine(c.Resume(c, 0));
Console.ReadKey();
c.Resume(c, 0);
}
static int TestFunc(IntPtr ptr)
{
var L = Lua.FromIntPtr(ptr);
Console.WriteLine("emitting a yield");
return L.Yield(0);
}
Metadata
Metadata
Assignees
Labels
No labels