# LinkedPool<T>

Store pooled objects using links in the objects themselves. TryPush and TryPop return false on contention.

Namespace: MeatMotion.Collections

Assembly: MeatMotion

```csharp
public struct LinkedPool<T>
    where T : class, ILinkedPoolNode<T>
```

[Runtime/Collections/MotionCollections.cs · L55](../../../source/Runtime/Collections/MotionCollections.cs.html#L55)

## Size

Number of nodes currently stored in the pool.

```csharp
public readonly int Size { get; }
```

[Runtime/Collections/MotionCollections.cs · L60](../../../source/Runtime/Collections/MotionCollections.cs.html#L60)

## TryPush

Push an unlinked node at the head. Null, linked nodes or contention return false.

```csharp
public bool TryPush(T item)
```

Parameters and return value

- `item` (`T`) Entry operated on by the collection.
- Returns: `bool`

[Runtime/Collections/MotionCollections.cs · L62](../../../source/Runtime/Collections/MotionCollections.cs.html#L62)

## TryPop

Remove and unlink the head node. Return false if empty or contended.

```csharp
public bool TryPop(out T result)
```

Parameters and return value

- `result` (`out T`) Receives the popped node.
- Returns: `bool`

[Runtime/Collections/MotionCollections.cs · L78](../../../source/Runtime/Collections/MotionCollections.cs.html#L78)
