Googles appar
Huvudmeny

Post a Comment On: cbloom rants

"09-18-13 - Fast TLS on Windows"

2 Comments -

1 – 2 of 2
Anonymous Anonymous said...

I'm confused. Is this entire post telling us what not to do, without telling us what to do? I understand that __declspec(thread) is preferred when not prohibited, but what about when it is prohibited?

September 28, 2013 at 10:50 AM

Blogger cbloom said...

The post implicitly assumes that the reader is aware of or can find TlsAlloc/TlsGetValue (or FlsAlloc/FlsGetValue).

The other option is to have your own "State" struct that you pass through every function in your code. The State can then be thread-local, or fiber-local, or job-local, etc.

September 28, 2013 at 11:08 AM

You can use some HTML tags, such as <b>, <i>, <a>

This blog does not allow anonymous comments.

Comment moderation has been enabled. All comments must be approved by the blog author.

You will be asked to sign in after submitting your comment.