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?

From Lew <noone@lewscanon.com>
Newsgroups comp.lang.java.programmer
Subject Re: Concurrent bidirectional one-to-many map?
Date 2011-05-11 09:00 -0400
Organization albasani.net
Message-ID <iqe195$eo9$3@news.albasani.net> (permalink)
References (6 earlier) <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>

Show all headers | 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