[Nemerle 0000927]: Memoize isn't thread-safe

3 views
Skip to first unread message

feed...@nemerle.org

unread,
Dec 8, 2008, 3:13:01 PM12/8/08
to nemerl...@googlegroups.com

The following issue has been RESOLVED.
======================================================================
<http://nemerle.org/bugs/view.php?id=927>
======================================================================
Reported By: divan
Assigned To: divan
======================================================================
Project: Nemerle
Issue ID: 927
Category: The Macro Library
Reproducibility: always
Severity: minor
Priority: normal
Status: resolved
Resolution: fixed
Fixed in Version:
======================================================================
Date Submitted: 02-20-2007 21:38 CET
Last Modified: 12-08-2008 21:13 CET
======================================================================
Summary: Memoize isn't thread-safe
Description:
1)Reads are not protected with lock.
That is while one thread writes to cache no thread must read from it
(Hashtable isn't thread-safe)
I think ReaderWriterLock should be used

2)Possibly cache creation have to be protected too
======================================================================

----------------------------------------------------------------------
divan - 12-08-08 21:13
----------------------------------------------------------------------
Fixed with simple lock and field initializers on r8161.
ReaderWriterLock need and quality are to be investigated.

Issue History
Date Modified Username Field Change
======================================================================
02-20-07 21:38 divan New Issue
03-02-07 11:55 divan Status new => assigned
03-02-07 11:55 divan Assigned To => divan
07-06-07 22:01 divan Issue Monitored: divan
12-08-08 21:13 divan Note Added: 0002144
12-08-08 21:13 divan Status assigned => resolved
12-08-08 21:13 divan Resolution open => fixed
12-08-08 21:13 divan Summary Memoize isn't thread-safe
=> Memoize isn\'t thread-safe
12-08-08 21:13 divan Description Updated
======================================================================

Reply all
Reply to author
Forward
0 new messages