As an uneducated programmer, used to threads,
semaphores, mutexes and queues, I am embarking on
a multithreaded file server.
My server speaks a protocol on a network socket,
and exposes a virtual file system containing both
data and control files.
the data file maps directly to a Channel, but the control
file can take several different types of message.
Should I create a Channel for each type or message or should
I have a single control file and messages of the form:
struct Msg {
int type;
char *ctrlmsg;
};
and then demultiplex in my receiving thread?
I know Channels and Threads are cheap but is it good practice
to use them with impunity?
[I remembers a lecture on the Transputer -
"just think of creatinga process as being as cheap as a
function call" ]
-Steve