# GetUnsafeBucketData

> Returns a "bucket" view of this hash map.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Collections](/engine/6000.7/script-reference/unity/collections.md)
* **Assembly:** UnityEngine.ManagedKernelModule

## GetUnsafeBucketData\<T, U>(NativeParallelHashMap\<T, T>)

Returns a "bucket" view of this hash map.

```csharp
public static UnsafeParallelHashMapBucketData GetUnsafeBucketData<TKey, TValue>(this NativeParallelHashMap<TKey, TValue> container) where TKey : unmanaged, IEquatable<TKey> where TValue : unmanaged
```

### Parameters

**** (\[NativeParallelHashMap\<T, T>]\(/engine/6000.7/script-reference/unity/collections/nativeparallelhashmap2)): The hash map.

### Returns

| Type                                                                                                                                    | Description                       |
| --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------- |
| [UnsafeParallelHashMapBucketData](/engine/6000.7/script-reference/unity/collections/lowlevel/unsafe/unsafeparallelhashmapbucketdata.md) | A "bucket" view of this hash map. |

### Remarks

Internally, the elements of a hash map are split into buckets of type [UnsafeParallelHashMapBucketData](/engine/6000.7/script-reference/unity/collections/lowlevel/unsafe/unsafeparallelhashmapbucketdata.md).

With buckets, a job can safely access the elements of a hash map concurrently as long as each individual bucket is accessed only from an individual thread. Effectively, it is not safe to read elements of an individual bucket concurrently, but it is safe to read elements of separate buckets concurrently.

## GetUnsafeBucketData\<T, U>(NativeParallelMultiHashMap\<T, T>)

Returns a "bucket" view of this multi hash map.

```csharp
public static UnsafeParallelHashMapBucketData GetUnsafeBucketData<TKey, TValue>(this NativeParallelMultiHashMap<TKey, TValue> container) where TKey : unmanaged, IEquatable<TKey> where TValue : unmanaged
```

### Parameters

**** (\[NativeParallelMultiHashMap\<T, T>]\(/engine/6000.7/script-reference/unity/collections/nativeparallelmultihashmap2)): The multi hash map.

### Returns

| Type                                                                                                                                    | Description                             |
| --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- |
| [UnsafeParallelHashMapBucketData](/engine/6000.7/script-reference/unity/collections/lowlevel/unsafe/unsafeparallelhashmapbucketdata.md) | A "bucket" view of this multi hash map. |

### Remarks

Internally, the elements of a hash map are split into buckets of type [UnsafeParallelHashMapBucketData](/engine/6000.7/script-reference/unity/collections/lowlevel/unsafe/unsafeparallelhashmapbucketdata.md).

With buckets, a job can safely access the elements of a hash map concurrently as long as each individual bucket is accessed only from an individual thread. Effectively, it is not safe to read elements of an individual bucket concurrently, but it is safe to read elements of separate buckets concurrently.
