I have server with multiple threads. I one (main) thread is MsgReceive() and there I need assign message to free(blocked) thread. If I’m right, the easiest way to do it is to use thread pool. But I need another thing and that is I need control which thread is assigned to message, because I want to assign the same thread for process as I assigned last time (i.e. previous message).
Is it somehow possible?
I want to ask another thing.
Should I create and destroy channel for each communication or should I reuse channels when communication finished for another one?
Probably both ways would work, but what is better practice?