`Check failed` in `tf.raw_ops.Batch` when the value of `num_batch_threads` is too large.
@SuryanarayanaY I was able to replicate the issue reported [here](https://colab.research.google.com/gist/sushreebarsa/71f54090ad4e738d724cede5423bb1a5/-6_tf_raw_ops_batch.ipynb).
Thank you!
### Issue type

Bug

### Have you reproduced the bug with TensorFlow Nightly?

Yes

### Source

binary

### TensorFlow version

tf 2.15

### Custom code

No

### OS platform and distribution

Linux Ubuntu 20.04

### Mobile device

_No response_

### Python version

3.10

### Bazel version

_No response_

### GCC/compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current behavior?

When the value of `num_batch_threads` is too large, `tf.raw_ops.Batch` triggers `Check failed` error.

### Standalone code to reproduce the issue

```shell
https://colab.research.google.com/drive/1F4NMwgDO2QY2NV6GYPVbVuRyCSsB7ZBZ?usp=sharing
```


### Relevant log output

```shell
Check failed: ret == 0 (11 vs. 0)Thread batch_threads_ creation via pthread_create() failed.
```
