Jerry Feldman wrote:
1. mutexed blocks (why does java call them 'synchronized' when they can't happen at the same time?) Mutex is simply one terminology for a "synchronization primitive". Semaphore is also used. There are other terminologies used in various other implementations of things.
I was just being ironic. Java is a moralistic language and insists on using final instead of const to avoid the oxymoron of a constant variable; so I think it ought to use asynchronized instead of synchronized to avoid the oxymoron of a synchronized block that cannot be run at the same time as any other synchronised block. I accept of course, that it's common practice to use such expressions. Hotplugging is another term that comes to mind. I know you can emulate this using a base class like the following, but it's still a bit clunky and error prone: class Monitor { public: Monitor(){ mutex = (pthread_mutex_t*)malloc( sizeof(pthread_mutex_t) ); pthread_mutex_init( mutex, 0 ); } virtual ~Monitor() = 0; void lock() const { pthread_mutex_lock( mutex ); } void unlock() const { pthread_mutex_unlock( mutex ); } private: mutable pthread_mutex_t* mutex; }; Monitor::~Monitor(){ free(mutex); } I like the idea of GC in C++ and IIRC an compiler implememntation may use GC. -- JDL