InputStream.read doesn't block read while waiting for data

From: Greg Taylor (GregTaylor_at_discussions.microsoft.com)
Date: 02/04/05


Date: Thu, 3 Feb 2005 17:59:04 -0800

Using J# 1.0 library, it appears that while read is waiting for data, some
kind of "message pump" in VS 2003 allows events to fire - ON THE SAME THREAD.
 So the call stack looks like:
<callback fn registered with Visual Studio event>
[<Non-user code>]
<my fn at the line where m_inputStream.read is called>
...

The callback is actually the UIHierarchy.SaveItem method for my own
UIHierarchy in VS 2003. I expected .read to block the thread COMPLETELY,
until data was available. Any ideas why it isn't?



Relevant Pages

  • Re: Thread question - I know something is not done right.
    ... public void WaitOne() ... // waiting on this object that there is a unit available. ... public static void QueueUserWorkItem(WaitCallback callback, ...
    (microsoft.public.dotnet.languages.csharp)
  • follwoup: PHP, timers, and event handler callbacks
    ... doesn't return true that you are safe to fire an error. ... downloadComplete is the event that I key on. ... ready to kick off the next callback function, ... Navigation to the subsequent page involves clicking a button. ...
    (comp.lang.php)
  • Re: wave APIs dont send Window Messages on completion
    ... we do need a message pump. ... As for other callback scenarios, ... > OpenNETCF Audio library suffers from the same malady as my own code. ... >>> messageWindow shouldn't be invoked after the first buffer of sound is ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Thread and Timer
    ... which you blocked the message pump. ... callback timers are about the most useless entities in all of Windows. ... I'd like to use a timer inside a thread. ... UINT g_iMessage; ...
    (microsoft.public.vc.mfc)
  • Re: Sockets Beginreceive not working correctly.
    ... fire, I assume it's the delegate functions that is actually acquiring the ... BeginRecieve function, thus I never get into the callback, so the buffer is ... StateObject state = new StateObject; ...
    (microsoft.public.dotnet.languages.csharp)

Loading