Sat Jan 08 01:50:42 2011: Request 64575 was acted upon.
Transaction: Correspondence added by ha...@strotbek.com
       Queue: Win32-Daemon
     Subject: [rt.cpan.org #64575] Start callback not called with Strawberry 
Perl 5.10 / 5.12
   Broken in: (no value)
    Severity: (no value)
       Owner: Nobody
  Requestors: ha...@strotbek.com
      Status: open
 Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=64575 >


> I don't understand how that could make a difference. I find only 2
> references to gMainThreadId in the sources:
> 
> In the DllMain() function (in Daemon.xs line 952) the variable is initialized:
> 
>                       gMainThreadId = GetCurrentThreadId();
> 
> This code is executed when the DLL is loaded into the process, before
> any other code in the same DLL can run.  Since GetCurrentThreadId()
> cannot fail, and thread ids are never 0, I can't see how gMainThreadId
> can ever be 0 at a later point in time.
> 
> The only other reference to gMainThreadId is a PostThreadMessage()
> call, which is not supposed to change the value of the thread id.
> 
> So how can gMainThreadId still be 0 inside the StartService() function?

According to my debug messages the DllMain() function isn't called, so
the gMainThreadId remains 0.

Reply via email to