Handling the thread type in overload selection