[interfacekit] Re: BHandler::fToken

  • From: DarkWyrm <bpmagic@xxxxxxxxxxxxxxx>
  • To: interfacekit@xxxxxxxxxxxxx
  • Date: Mon, 10 Mar 2003 13:44:08 -0500

This might sound strange coming from me, but man, you guys are going into 
stuff that I don't understand very well. What's a hash table?

Anyway, the way the server is going to issue tokens is via the server's 
TokenHandler class. It's nowhere near as complicated as I suspect BTokenSpace 
is. You can allocate certain values to be excluded from being tokens such 
that if a function creates a token or returns an error, you can be sure that 
no token returned will be the same as the error code. Anyway, the server 
keeps track of tokens for 6 different groups to my knowledge at this point: 
BApplications, BWindows, BViews, BBitmaps, BFonts, and BPictures. Of course, 
BApplication tokens are for the server's internal use only. Considering that 
if you returned 1 per second, it would take over 100 years before tokens 
would wrap around, I think that it should be pretty safe - most computers I 
know of are rebooted at least once every couple years.

Server tokens are tracked in different ways for different objects. The font 
manager code handles BFont tokens, the bitmap manager code covers BBitmaps, 
but the main app_server thread manages BApplication tokens. Hope this clears 
things up for everyone. :^)

--DW


Other related posts: