View source code
							
							
						
								Display the source code in std/experimental/allocator/package.d from which this
								page was generated on github.
							
						
							Report a bug
							
						
								If you spot a problem with this page, click here to create a
								Bugzilla issue.
							
						
							
								Improve this page
							
							
					
								Quickly fork, edit online, and submit a pull request for this page.
								Requires a signed-in GitHub account. This works well for small changes.
								If you'd like to make larger changes you may want to consider using
								local clone.
							
						Struct std.experimental.allocator.ThreadLocal
Stores an allocator object in thread-local storage (i.e. non-shared D
global). ThreadLocal!A is a subtype of A so it appears to implement
A's allocator primitives.
						
				struct ThreadLocal(A)
				;
						
					
				A must hold state, otherwise ThreadLocal!A refuses instantiation. This
means e.g. ThreadLocal!Mallocator does not work because Mallocator's
state is not stored as members of Mallocator, but instead is hidden in the
C library implementation.
Constructors
| Name | Description | 
|---|---|
| this() | ThreadLocaldisables all constructors. The intended usage isThreadLocal!A. | 
Fields
| Name | Type | Description | 
|---|---|---|
| instance | A | The allocator instance. | 
Example
import stdExample
import stdAuthors
License
					Copyright © 1999-2024 by the D Language Foundation | Page generated by ddox.