[concurrency-interest] Which lock to use

Katz Guy Guy_Katz@icomverse.com
Wed, 25 Feb 2004 09:36:12 +0200


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C3FB71.46E9D874
Content-Type: text/plain

Hi;
I have an application that is based on cached data that is being updated
periodically (once every 5 hours).
I have a scheduler that is responsible for invalidating data so that data
refresh can be made.
My problem is which locking system to use for the time of data refresh
operation (I still have data readers coming in but need to hold them until I
refresh the data).
Are Objects like ReadWriteLock suitable for this kind of case? Should I stay
with regular synch? What options do I have here?
Any help would be appreciated.
Thanks in advance.

------_=_NextPart_001_01C3FB71.46E9D874
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2655.35">
<TITLE>Which lock to use</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2 FACE=3D"Arial">Hi;</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">I have an application that is based =
on cached data that is being updated periodically (once every 5 =
hours).</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">I have a scheduler that is =
responsible for invalidating data so that data refresh can be =
made.</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">My problem is which locking system to =
use for the time of data refresh operation (I still have data readers =
coming in but need to hold them until I refresh the data).</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Are Objects like ReadWriteLock =
suitable for this kind of case? Should I stay with regular synch? What =
options do I have here?</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Any help would be appreciated.</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Thanks in advance.</FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C3FB71.46E9D874--