It seems to call unlock in the finally clause.

Thanks,

Jun


On Wed, Apr 23, 2014 at 6:12 AM, 冯傲风 <[email protected]> wrote:

> HiI am reading the kafka source code now. I have a problem about the
> "BufferPool" class int the file
> "org.apache.kafka.clients.producer.internals.BufferPool.java"the source
> code is like this:
> this.lock.lock();        try {            // check if we have a free
> buffer of the right size pooled            if (size == poolableSize &&
> !this.free.isEmpty())                return this.free.pollFirst();
> the function returns a free memory without "unlock" operation?
> I haven't found any issue about this in the jira web site. is it a
> mistake? or Do I misunderstand the code?
> I'm sorry ,my english is poor.  look forward to your reply.
>

Reply via email to