Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #3957
| From | Sebastian <sebastian@undisclosed.invalid> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Concurrent bidirectional one-to-many map? |
| Date | 2011-05-11 10:51 +0200 |
| Organization | albasani.net |
| Message-ID | <iqdinb$fjv$1@news.albasani.net> (permalink) |
| References | (5 earlier) <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> |
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?
-- Sebastian
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar
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