[interfacekit] Re: BHandler::fToken

Ingo Weinhold wrote:
> Again: Why not introduce an additional boolean flag into BTokenSpace that
> is set, when the counter wraps around, and causes the tokens to be checked
> against the map before being issued? That's only three or four lines more
> code without performance penalty for the common case, and it ensures that
> apps with a somewhat strange usage pattern of BHandlers/BViews will still
> work (in average also without performance problems).

So, in your estimation, searching the token space for free tokens will 
be fast enough to make having a cache of free tokens not worth it? 
Could it be that I have prematurely optimized?? ;)

> BTW, I even could imagine such an application. Just think of a server that
> is able to handle hundreds of connections per seconds and creating a
> handler (or looper) per connection. Then it could exhaust the token space
> in a year or earlier.

That would be some pretty serious uptime. =)

e


Other related posts: