uber-research / ape-x

This repo replicates the results Horgan et al obtained in "Distributed Prioritized Experience Replay"
Apache License 2.0
190 stars 22 forks source link

How does ReplayBuffer ensure multithread safety? #7

Open cwf1005 opened 2 years ago

cwf1005 commented 2 years ago

There are three operation related replaybuffer Actor: enqueue Leaner : sample_proportional_from_buffer() sample transitions from replay buffer Learner: replay_buffer.assign(idxs, new_priorities) update priorities

I wonder that: How does replaybuffer ensure multithread safety? idxs may have been replaced since the actor performs enqueue operations