facebookresearch / torchbeast

A PyTorch Platform for Distributed RL
Apache License 2.0
734 stars 113 forks source link

why using SimpleQueue with threading lock? #4

Closed 1576012404 closed 4 years ago

1576012404 commented 4 years ago

it seems that SimpleQueue is thread safe,so why need use threading lock in get_batch function in the file monobeast.py?

heiner commented 4 years ago

The lock makes sure that only one thread fills a batch at a time.