bbufli = class implements bbufl extends bbuf_basei slot l:lock delegate lock, free to l new = method(n:int) replies(self{empty.free}) b:self := super(n); b.l := lock!new(); reply(b!{empty.free}) end new end bbufliAbove is equivalent to the following:
bbufli = class implements bbufl extends bbuf_base slot l:lock new = method(n:int) replies(self{empty.free}) b:self := super(n); b.l := lock!new(); reply(b!{empty.free}) end new lock = method({*.free}b:self{-.locked}) b.l!{-.locked} end lock free = method({*.locked}b:self{-.free}) b.l!{-.free} end free end bbufli