basvandijk/regions — pull request #6 by qnikst (2014-08-27 20:43:27+00:00)
Title: But onExit under a mask.

Previously code had potential race condition, because asynchronous
event may arrive when onExit function is in the middle on a register
then it will never be called.

This means that it should either be documented (and user will have
to provided required protection on his own), or function should be
implemented in a safe way. The former approach was choosen.

---
I'm not sure if this way is the most sane one and maybe we just need
to add few more docs.