meetecho/janus-gateway — pull request #106 by Computician (2014-12-09 22:53:40+00:00)
Title: Fixing bug when video room is destroyed right when participant is leaving the room

The main changes are these:
- Make room destruction lazy so that participants have time to clean up if they are wanting to leave at just about the same time.
- Added mutex logic to protect the participant hash table so that participants are not removed when another thread is iterating over them
- Checked for room destruction when iterating over participants so that mutex can be freed ASAP if the room is destroyed

This has been tested in my environment(though not with numerous rooms being created, joined, destroyed, and left all rapidly).