A
Andrew Baker
OK this has me perplexed, puzzled and bamboozled!
I have a remoting service which I displayed a message box in. I then
wondered what would happen if a client made a call to the service
while the message box was being displayed. Since the call comes in on
a different thread the client call was not blocked. This seemed to
make sense to me.
Next I thought, what will happen when the client calls into the server
if I try to use a delegate to call back onto the UI thread? To my mind
I thought I should be blocked, but I was able to perform work on the
UI thread while the message box was displayed. So finally, I thought I
wonder what happens if I then also try an display another message box
on the UI thread and sure enough I was able to display two modal
message boxs on the UI thread (I put the current thread ID in the
message boxes just to make sure it was on the same thread).
I don't understand this behaviour as I think a modal dialog should
block a thread... But I am clearly wrong, I just don't know why?!
andrew
www.vbusers.com
I have a remoting service which I displayed a message box in. I then
wondered what would happen if a client made a call to the service
while the message box was being displayed. Since the call comes in on
a different thread the client call was not blocked. This seemed to
make sense to me.
Next I thought, what will happen when the client calls into the server
if I try to use a delegate to call back onto the UI thread? To my mind
I thought I should be blocked, but I was able to perform work on the
UI thread while the message box was displayed. So finally, I thought I
wonder what happens if I then also try an display another message box
on the UI thread and sure enough I was able to display two modal
message boxs on the UI thread (I put the current thread ID in the
message boxes just to make sure it was on the same thread).
I don't understand this behaviour as I think a modal dialog should
block a thread... But I am clearly wrong, I just don't know why?!
andrew
www.vbusers.com