Browse Source

change: rename RentUseThread to RentUserThread (typo)

Akeit0 5 months ago
parent
commit
44beb9d308
3 changed files with 3 additions and 3 deletions
  1. 1 1
      sandbox/ConsoleApp2/Program.cs
  2. 1 1
      src/Lua/LuaThreadExtensions.cs
  3. 1 1
      src/Lua/Runtime/Lease.cs

+ 1 - 1
sandbox/ConsoleApp2/Program.cs

@@ -7,7 +7,7 @@ var state = LuaState.Create();
 state.OpenStandardLibraries();
 state.OpenStandardLibraries();
 {
 {
     var closure = state.Load("return function (a,b,...)  print('a : '..a..' b :'..'args : ',...) end", "@simple");
     var closure = state.Load("return function (a,b,...)  print('a : '..a..' b :'..'args : ',...) end", "@simple");
-    using var threadLease = state.MainThread.RentUseThread();
+    using var threadLease = state.MainThread.RentUserThread();
     var access = threadLease.Thread.RootAccess;
     var access = threadLease.Thread.RootAccess;
     {
     {
         var count = await access.RunAsync(closure, 0);
         var count = await access.RunAsync(closure, 0);

+ 1 - 1
src/Lua/LuaThreadExtensions.cs

@@ -4,7 +4,7 @@ namespace Lua;
 
 
 public static class LuaThreadExtensions
 public static class LuaThreadExtensions
 {
 {
-    public static UseThreadLease RentUseThread(this LuaThread thread)
+    public static UserThreadLease RentUserThread(this LuaThread thread)
     {
     {
         return new(LuaUserThread.Create(thread));
         return new(LuaUserThread.Create(thread));
     }
     }

+ 1 - 1
src/Lua/Runtime/Lease.cs

@@ -1,6 +1,6 @@
 namespace Lua.Runtime
 namespace Lua.Runtime
 {
 {
-    public readonly struct UseThreadLease(LuaUserThread thread) : IDisposable
+    public readonly struct UserThreadLease(LuaUserThread thread) : IDisposable
     {
     {
         public LuaUserThread Thread { get; } = thread;
         public LuaUserThread Thread { get; } = thread;