In my code I want to (at least in debug builds) ensure that certain functions are only executed in a specific thread. More specifically consider the following class: