Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #3968

Re: Concurrent bidirectional one-to-many map?

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!.POSTED!not-for-mail
From Lew <noone@lewscanon.com>
Newsgroups comp.lang.java.programmer
Subject Re: Concurrent bidirectional one-to-many map?
Date Wed, 11 May 2011 09:00:23 -0400
Organization albasani.net
Lines 39
Message-ID <iqe195$eo9$3@news.albasani.net> (permalink)
References <iq1kf0$ee2$1@news.albasani.net> <iq1mmc$hbv$1@dont-email.me> <iq348b$iv1$1@news.albasani.net> <nsadnUZcjoF01ljQnZ2dnUVZ_gednZ2d@earthlink.com> <alpine.DEB.2.00.1105080428540.28763@urchin.earth.li> <08586289-8935-4532-93d0-e8c7dd45cb24@c1g2000yqe.googlegroups.com> <alpine.DEB.2.00.1105091825310.18864@urchin.earth.li> <iq9kf7$fr1$1@news.albasani.net> <alpine.DEB.2.00.1105100824001.25309@urchin.earth.li> <iqdg8g$aao$1@news.albasani.net> <iqdinb$fjv$1@news.albasani.net>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 7bit
X-Trace news.albasani.net OffCsC8ERCav7B5i5LyUeJkgs03M40jaJhbvd1dbAYQSXZftpKk/reuvx+L777ST84eDCzEmGPiEdGfZHfTovdo069bceBBniTnCB6QN6KLWk6h2YM8S/wc3Aayp9v5i
NNTP-Posting-Date Wed, 11 May 2011 13:00:22 +0000 (UTC)
Injection-Info news.albasani.net; logging-data="XatB/8ASZJMCbiCxi62gIW6xrAj5TEFZyqgs5J7OlFU3upECQ0NC7YqU1bMDKJ9NHAev+/++tNpTmxobv0n2Y9VeN4zrN3Atm4OhOI6bUJx3DYS3Hztm8lDbofNL/afV"; mail-complaints-to="abuse@albasani.net"
User-Agent Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110424 Thunderbird/3.1.10
In-Reply-To <iqdinb$fjv$1@news.albasani.net>
Cancel-Lock sha1:235Es3HQxrpDfdn2CB9J/sVlyOo=
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:3968

Show key headers only | View raw


On 05/11/2011 04:51 AM, Sebastian wrote:
> Am 11.05.2011 10:09, schrieb Sebastian:
>>
>>
>> Here's a bit of the WorkspaceManager code referred to above:
>>
>> public void closeWorkspace( UUID id )
>> {
>> writeLock.lock(); // <<<<<<<<<<< necessary ?
>> try {
>> Workspace wp = wpMap.remove( id );
>> ...
>
> As afterthought to my immediately preceding post,
> let me add that it would be nice if we could process
> unrelated workspaces in parallel. How about having a
> ReentrantReadWriteLock associated with each workspace,
> and using themlike this:
>
> Workspace wp = wpMap.get( id );
> wp.writeLock.lock();
> try {
> wpMap.remove( id );
> ...
>
> Wouldn't this improve things?

Why have you never answered my questions about long locks?

You seem to be going through a lot of gyrations unnecessarily.  Just lock the 
data you need to lock.

It's kind of rude that you ask for help but don't respond to requests for 
further information.

-- 
Lew
Honi soit qui mal y pense.
http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Concurrent bidirectional one-to-many map? Sebastian <sebastian@undisclosed.invalid> - 2011-05-06 22:07 +0200
  Re: Concurrent bidirectional one-to-many map? markspace <-@.> - 2011-05-06 13:45 -0700
    Re: Concurrent bidirectional one-to-many map? Sebastian <sebastian@undisclosed.invalid> - 2011-05-07 11:43 +0200
      Re: Concurrent bidirectional one-to-many map? Lew <noone@lewscanon.com> - 2011-05-07 07:59 -0400
        Re: Concurrent bidirectional one-to-many map? Lew <noone@lewscanon.com> - 2011-05-07 12:49 -0400
          Re: Concurrent bidirectional one-to-many map? Sebastian <sebastian@undisclosed.invalid> - 2011-05-07 21:34 +0200
      Re: Concurrent bidirectional one-to-many map? Patricia Shanahan <pats@acm.org> - 2011-05-07 06:40 -0700
        Re: Concurrent bidirectional one-to-many map? Tom Anderson <twic@urchin.earth.li> - 2011-05-08 04:51 +0100
          Re: Concurrent bidirectional one-to-many map? Robert Klemme <shortcutter@googlemail.com> - 2011-05-09 06:43 -0700
            Re: Concurrent bidirectional one-to-many map? Tom Anderson <twic@urchin.earth.li> - 2011-05-09 18:28 +0100
              Re: Concurrent bidirectional one-to-many map? Sebastian <sebastian@undisclosed.invalid> - 2011-05-09 22:57 +0200
                Re: Concurrent bidirectional one-to-many map? Lew <noone@lewscanon.com> - 2011-05-09 18:36 -0400
                Re: Concurrent bidirectional one-to-many map? Tom Anderson <twic@urchin.earth.li> - 2011-05-10 08:34 +0100
                Re: Concurrent bidirectional one-to-many map? Sebastian <sebastian@undisclosed.invalid> - 2011-05-11 10:09 +0200
                Re: Concurrent bidirectional one-to-many map? Sebastian <sebastian@undisclosed.invalid> - 2011-05-11 10:51 +0200
                Re: Concurrent bidirectional one-to-many map? Robert Klemme <shortcutter@googlemail.com> - 2011-05-11 04:55 -0700
                Re: Concurrent bidirectional one-to-many map? Lew <noone@lewscanon.com> - 2011-05-11 09:00 -0400
                Re: Concurrent bidirectional one-to-many map? Sebastian <sebastian@undisclosed.invalid> - 2011-05-11 20:47 +0200
      Re: Concurrent bidirectional one-to-many map? markspace <-@.> - 2011-05-07 09:35 -0700
      Re: Concurrent bidirectional one-to-many map? Michal Kleczek <kleku75@gmail.com> - 2011-05-09 16:42 +0200
  Re: Concurrent bidirectional one-to-many map? Roedy Green <see_website@mindprod.com.invalid> - 2011-05-07 03:46 -0700

csiph-web