2011년 9월 6일 화요일 오후 5:21
In diagnosing this problem in a real app, I was able to recreate it using the HelloWorldR2 console sample project, which is working perfectly.
I basically added a new WPF project to the HelloWorldR2 solution, added a single button to the main form, and copy-pasted the code from the main method of the HelloWorldR2 console app sample. When I run this app and click the button, the cluster gets the job and runs it, but the client never receives any responses, and just sits there, blocked at the GetResponses call.
What could be going on here? Can anyone else confirm this behaviour?
2011년 9월 6일 화요일 오후 5:39
Same thing with a WinForms app.
If I run the service call/response gather on a thread pool thread it works as expected. I guess you can't run BrokerClient on a UI thread?
2011년 9월 7일 수요일 오전 3:13
You cannot call GetResponses from UI thread. There're two ways you can do:
1. use response handler instead
2. call getresponse from other thread than main GUI thread.
- 답변으로 표시됨 wbradney 2011년 9월 7일 수요일 오후 3:40
2011년 9월 7일 수요일 오후 3:53Thanks for the confirmation. In that case it might be nice in a future release to find a way to have GetResponses immediately throw if it detects this condition, rather than wait forever.
- 편집됨 wbradney 2011년 9월 7일 수요일 오후 3:55