On Friday 28 September 2001 10:33 am, Branko Čibej wrote:
> Ryan Bloom wrote:
> >I would suggest not using a thread ID. They are incedibly non-portable.
> >Windows uses HANDLEs instead of ints.
>
> Not exactly. Windows has both thread handles and thead IDs. Use
> GetCurrentThread to get a handle, and GetCurrentThreadId to get an int.
>
> And anyway, a hash key doesn't have to be an int. Any kind of unique
> object will do. I doubt there's a threading library that doesn't have
> some sort of unique thread identifier available.
I am saying that today's APR doesn't have integer based thread ID's on all
platforms, nor should it need to. I am also saying that using a hash is just
plain wrong for this. It will be faster, and easier with just a simple array.
Ryan
______________________________________________________________
Ryan Bloom rbb@apache.org
Covalent Technologies rbb@covalent.net
--------------------------------------------------------------
|