public void SerialCreate(object data) { Hashtable ht = (Hashtable)data; byte[] key = (byte[])ht["key"]; byte[] value = (byte[])ht["value"]; int ttl = (int)ht["ttl"]; int op = (int)ht["op"]; bool expected_result = (bool)ht["result"]; bool result = false; try { result = default_dht.Create(key, value, ttl); } catch { result = false; } if (result != expected_result) { if (!result) { lock (_lock) { Console.WriteLine("Possible failure from unsuccessful Create: " + op); } } else { lock (_lock) { Console.WriteLine("Possible failure from successful Create: " + op); } } } }