private static void NewMetadataLocationToProcesses(string id, string location) { List <Thread> requests = new List <Thread>(); foreach (var entry in processes) { IProcessToPM process = entry.Value; if (id.First() == 'm') { process.MetadataLocation(id, location); } else { Thread request = new Thread(() => process.MetadataLocation(id, location)); requests.Add(request); } } // sends to all non-metadata the new metadata in broadcast foreach (Thread request in requests) { request.Start(); } foreach (Thread request in requests) { request.Join(); } }
private static void SendMetadataLocations(IProcessToPM process) { foreach (var entry in metadataLocations) { string id = entry.Key; string location = entry.Value; process.MetadataLocation(id, location); } }
public static void DumpProcess(string id) { IProcessToPM process = (IProcessToPM)GetProcess(id); process.Dump(); }