Re: Sleeping thread and callback delegate

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Jon Skeet [C# MVP] (skeet_at_pobox.com)
Date: 02/10/05


Date: Thu, 10 Feb 2005 07:07:30 -0000

COMfused <COMfused@discussions.microsoft.com> wrote:
> I have a thread that has a delegate function which will be called when
> another process exits. This thread went to sleep, the process exits and is
> supposed to call the delegate, but it did not happen. When the thread wake
> up, the function is not called either.
>
> The question is, will a thread ignore all the callback when it is sleeping?

How are you trying to make the callback in the thread? Could you post a
short but complete program which demonstrates the
problem?

See http://www.pobox.com/~skeet/csharp/complete.html for details of
what I mean by that.

-- 
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too


Relevant Pages

  • Sleeping thread and callback delegate
    ... I have a thread that has a delegate function which will be called when ... This thread went to sleep, the process exits and is ... will a thread ignore all the callback when it is sleeping? ...
    (microsoft.public.dotnet.general)
  • Threads and Callbacks
    ... I think my question pertains to type casting unmanaged data passed back in a callback. ... Public UserData As Short ... ByVal userdata As Integer) As Boolean ... It will worke when I changed the delegate function parameters to pointers: ...
    (microsoft.public.dotnet.languages.vb)