1-) C# RMOS - sınırsız beklememek için lock kullanılan metoda timeout koymak
public static object NewSiparisLock = new object();
public string newSiparisPr(int Fisno, bool Mars, int Split, string SiparisNot = "")//null
{
if (Monitor.TryEnter(NewSiparisLock, new TimeSpan(0, 0, 30)))
try
// kodları buraya yaz
}
finally
Monitor.Exit(NewSiparisLock);
açıklama : 30 saniye sonra lock u açar
kaynak : https://stackoverflow.com/questions/6049346/how-long-will-a-c-sharp-lock-wait-and-what-if-the-code-crashes-during-the-lock