ln.threading/ln.threading/ThreadHelpers.cs

17 lines
283 B
C#
Raw Normal View History

2020-11-18 00:23:20 +01:00
using System;
namespace ln.threading
{
public static class ThreadHelpers
{
public static T GetLockedValue<T>(object lockObject,Func<T> getter)
{
lock (lockObject)
{
return getter();
}
}
}
}