Skip to content

Conversation

@Miffyli
Copy link

@Miffyli Miffyli commented Mar 26, 2017

Processes/threads got stuck in queue.get() operations which normally block indefinitely. This commit adds timeouts with required checks to quit when exit_flags are set to True.
Added exit_flag for ProcessStats.
Added long timeout for receiving prediction in ProcessAgent. I don't see why this hangs at times but during tests there were rare cases where this part hanged.

The code "overshoots" the number of episodes defined in Config before closing. With EPISODES=10 my run reaches ~60 episodes before closing.

Edit: Actually this could be made better by using multiprocessing.Queue.close. It would still require try-excepts but would avoid using get every 0.001 seconds.

Miffyli added 2 commits March 26, 2017 15:32
…get() operations, added exit_flag for ProcessStats
…prediction_q. These seemed to cause rare occasions where joining processes hanged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant