posted 14 years ago
I saw a sample code, in which instead of implementing the process as a monitor with arrive and depart access methods, the process is implemented as a thread which receives singals from channels called arrive and depart. The channel version of the car park process looks much more clumsy. Then why channels? When do people usually use channel, correspondingly synchronous message-passing for what? The professor mentioned Ada and Occam, the implementation of channel with them are simpler, but they are somehow hardware-oriented(?? to deal with the electronic signals in the integrated circuit??). If so, why does java still have Channel/Select/Selectable? There must be some usage, when to use for what? Thank you very much in advance.