In my engine, I have a static method that can be called from two different threads.
I would like for a way to know which thread is calling the method. I want to change the method slightly depending on the thread, but would like to still just use 1 method.
Any thoughts would be appreciated!
For example:
// Thread 1
a();
// Thread 2
a();
static void a() {
if ( getThread() == THREAD_1 ) {
// Do stuff
} else {
// Do other stuff
}
// Do even more stuff
}