public static int IsCommandWaiting(Int64 ix)
{
//LOG.DebugFormat("IsCommandWaiting: {0}", ix);
try
{
lock (getInstance(ix).syncLock)
{
foreach (KeyValuePair<int, MQLCommandRequest> pair in getInstance(ix).commandRequests)
{
//LOG.DebugFormat("IsCommandWaiting: commandRequest: {0}", pair.Value.ToString());
if (pair.Value.CommandWaiting)
{
//LOG.DebugFormat("IsCommandWaiting: commandRequest: returning: {0}", pair.Key);
return pair.Key;
}
}
}
//LOG.DebugFormat("IsCommandWaiting: returning -1");
return -1;
}
catch (Exception e)
{
LOG.Error(e);
return -1;
}
}