Make allocators shared

This commit is contained in:
2016-10-04 18:19:48 +02:00
parent be9181698a
commit 698660c4c8
14 changed files with 504 additions and 448 deletions

View File

@ -20,7 +20,6 @@ import tanya.memory;
*/
class Queue(T)
{
@nogc:
/**
* Creates a new $(D_PSYMBOL Queue).
*
@ -28,7 +27,7 @@ class Queue(T)
* allocator = The allocator should be used for the element
* allocations.
*/
this(Allocator allocator = defaultAllocator)
this(shared Allocator allocator = defaultAllocator)
{
this.allocator = allocator;
}
@ -207,7 +206,7 @@ class Queue(T)
/// The last element of the list.
protected Entry* rear;
private Allocator allocator;
private shared Allocator allocator;
}
///