apr-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 45298] New: apr_os_thread_get() differs between windows and unix when thread is detached
Date Fri, 27 Jun 2008 12:56:09 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=45298

           Summary: apr_os_thread_get() differs between windows and unix
                    when thread is detached
           Product: APR
           Version: HEAD
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: APR
        AssignedTo: bugs@apr.apache.org
        ReportedBy: Joe.Mudd@sas.com


On Windows when a thread is created detached or apr_thread_detach() is called,
the apr_thread_t->td member gets set to NULL.  Therefore, when
apr_os_thread_get() is called, NULL is returned.

This differs from the UNIX implementation which always returns the pthread_t *
even if the thread is detached.

Also, similar to Bug 42728, it appears to be possible for apr_os_thread_get()
to be called in the created thread before apr_thread_create() in the creating
thread has had a chance to set thd->td.

Perhaps threads on Windows should be created with CREATE_SUSPENDED flag and
ResumeThread() should be called once thd->td has been set.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


Mime
View raw message