타이머를 설정하고 완료 될 때까지 기다릴 수 없도록이 방법을 스레드 아웃하고 싶습니다. 그것은 서비스에 대한 호출입니다.C에서 스레딩 문제 #
System.Threading.Thread newThread;
//RestartValueEngineService();
List<TransactionInfo> currentIdsForValuation = ((counter + 7000) <= allIds.Count)
? allIds.GetRange(counter, 7000)
: allIds.GetRange(counter, allIds.Count - counter);
translatedParams.tranquoteIds = currentIdsForValuation;
// thread this out
newThread = new System.Threading.Thread(callValueEng(translatedParams));
를하지만 말하는 :
private static void callValueEng(ValueEngineService.Contracts.ValueEngServiceParams param)
{
using (WCFServiceChannelFactory<IValueEngineService> client =
new WCFServiceChannelFactory<IValueEngineService>(
Repository.Instance.GetWCFServiceUri(typeof(IValueEngineService))))
{
client.Call(x => x.ValueManyTransactionsWithOldEngines(translatedParams));
}
}
나는 이런 식으로 그것을 밖으로 스레딩 시도 '최고의 과부하가 일치하는 일부 잘못된 인수가 있습니다.' 내가 도대체 뭘 잘못하고있는 겁니까?
어떻게 전달합니까? – slandau
실수 (매개 변수 간과)를 수정했습니다. – Bas
BeginIvoke가 새 스레드를 생성하지 않습니다. – sll