enthought/traits — pull request #140 by sjagoe (2014-02-19 19:08:09+00:00)
Title: Keep records in memory unformatted and allow optional saving to a directory

This probably needs more testing around edge-cases of thread safety.

The `ChangeEventContainer` and `ThreadChangeEventContainer` follow the same pattern as the recorders. Each thread gets its own `ThreadChangeEventContainer`, allowing it to avoid locking on every trait change operation. This is where potential thread-safety issues come in:

If a thread is continuing outside of the context manager and creating trace records, the user may be able to dump to a file while records are still being generated.