Generator should use Process Lock when pickle safe instead of Threading Lock (#6911)
Generator should use Process Lock when pickle safe instead of Threading Lock (#6911)

* Fix the issue that when n can be mod by batch_size, the shuffle never happened

* Ensure generator lock will be process version instead of threading lock

* Add refs and comments of training generator lock

* Update comment

keras-team/keras,keras-team/keras