mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julien Vermillard <jvermill...@gmail.com>
Subject Re: [MINA 3] Session write queue
Date Sat, 10 Nov 2012 19:42:02 GMT
I think a simple spin lock would be much faster than plain java lock,
because we have two thread sharing short time locked resource, the thread
wanting to lock can loop a little it will receive the lock very quickly. In
case of a java lock the thread will be candidate for context switching and
I'm not sure it's a good idea for write performance.

Anyway we need to test that.
Julien


On Sat, Nov 10, 2012 at 11:06 AM, Julien Vermillard
<jvermillard@gmail.com>wrote:

> it's not a problem of writing it's a problem of removing the interested
> write ops on the socket while another thread add a request in the queue.
>
>
> On Sat, Nov 10, 2012 at 10:58 AM, Emmanuel Lécharny <elecharny@gmail.com>wrote:
>
>> Le 11/10/12 10:52 AM, Emmanuel Lécharny a écrit :
>> > Le 11/10/12 9:28 AM, Julien Vermillard a écrit :
>> >> hmm I think the queue sync was added (by you?) because even if it's a
>> >> conncurent queue, the write registration could fail if a thead write in
>> >>  the queue while the selector loop write it.
>> > That's possible I added the lock, I don't reember,
>>
>> http://svn.apache.org/viewvc?rev=1210888&view=rev
>>
>> Thunderbird has a better memory that I do :)
>>
>>
>>
>>
>> --
>> Regards,
>> Cordialement,
>> Emmanuel Lécharny
>> www.iktek.com
>>
>>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message