[Date Prev][Date Next][Thread Prev][Thread Next][Author Index][Date Index][Thread Index]

Re: translator enhancement needed, correction



The smalltalk form for a critical section is ok (aSema4 critical: [block])
but the c++ equivalent doesn't strike me as particularly obvious:

{
  MUTEX_BEGIN(aSema4);
  critical code
}

  My problem is that the macro >declares< the start of the critical section,
but then also >implies< (inobviously) the end (exit of the block).  I would
prefer a name that doesn't seem so asymmetric.  How about:
{
  CRITICAL_BLOCK(aSema4);
  ...
}

--Hugh