# LinkedPool<T>

ノード自身に次の要素へのリンクを持たせるプールです。競合中はTryPush・TryPopがfalseを返します。

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

プールが現在保持するノード数を返します。

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

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

## TryPush

未登録ノードを先頭に追加します。null、既にリンク済み、または競合中ならfalseを返します。

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

引数と戻り値

- `item` (`T`) コレクションが扱う要素。
- 戻り値: `bool`

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

## TryPop

先頭のノードを取り出してリンクを切ります。空または競合中はfalseです。

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

引数と戻り値

- `result` (`out T`) 取り出したノードの出力先。
- 戻り値: `bool`

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