i need to lock a method preventing multiple simultaneous execution, this is my solutions, is it thread safe? is it safe?
public async Task ExecuteApiCalls()
{
lock (lockObject)
{
var t = Task.Run(async () => {
//my async code
}
Task.WaitAny(t);
});
}