public void Load(ResourceHandle handle) { try { Intermediate data; ResType res = ReadResourceWithName(handle.Name, out data); queue.Add(() => { try { ThreadLoad(handle, res, data); } catch (Exception) { throw new NotImplementedException("Exception in commandQueue should be handled."); } finally { handle.Finished(); } }); } catch (Exception e) { handle.Finished(); throw e; } }
public void Load(ResourceHandle resourceHandle) { executor.Add(() => { loader.Load(resourceHandle); }); }