Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.

clearing TLS

renorm
Beginner
116 Views
How TLS local copies are re-created after calling clear method? Default constructed or copy constructed from the exemplar?

Also, can TLS hurt scalability? Say, does TLS overhead increases as more threads are used?


Thank you!
0 Kudos
1 Reply
Kirill_R_Intel
Employee
116 Views
The clear method of the enumerable_thread_specific class destroys objects. After this they are created again the same way as new ones. It's up to you what construction way to use: default or with examplar, just the same as when objects are initially created.

There shouldn't be hurt on scalability. There can be some effect on many threads, but not really significant.

Regards,
Kirill
Reply