RE: [squeak-dev] WeakArray and use of weak collections.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

RE: [squeak-dev] WeakArray and use of weak collections.

Schwab,Wilhelm K
Gary,

My simple-minded view of this is that anything with Shared or Weak in
the name must be thread-safe.  The weak collections are manipulated by
at least two threads, the caller and the weakling cleanup thread.

Thanks for stress testing this!

Bill





Gary Chambers <gazzaguru2@...> wrote:
If you can think of a better way of blocking if finalization is in
progress...
only WeakRegistry has its own protection semaphore at present. (uses
WeakKeyDictionary, rather than Identity, oddly).


Wilhelm K. Schwab, Ph.D.
University of Florida
Department of Anesthesiology
PO Box 100254
Gainesville, FL 32610-0254

Email: [hidden email]
Tel: (352) 846-1285
FAX: (352) 392-7029


Reply | Threaded
Open this post in threaded view
|

RE: [squeak-dev] WeakArray and use of weak collections.

Gary Chambers-4
It would be better for per-instance access to locking on weak collections
(like WeakRegistry does). For the moment, my #critical: works for us (was
previously no access to the semaphore for that on WeakArray class).

Stress is definitely the word (for working out what was going wrong!).

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]]On Behalf Of Bill
> Schwab
> Sent: 25 February 2008 4:20 PM
> To: [hidden email]
> Subject: RE: [squeak-dev] WeakArray and use of weak collections.
>
>
> Gary,
>
> My simple-minded view of this is that anything with Shared or Weak in
> the name must be thread-safe.  The weak collections are manipulated by
> at least two threads, the caller and the weakling cleanup thread.
>
> Thanks for stress testing this!
>
> Bill
>
>
>
>
>
> Gary Chambers <gazzaguru2@...> wrote:
> If you can think of a better way of blocking if finalization is in
> progress...
> only WeakRegistry has its own protection semaphore at present. (uses
> WeakKeyDictionary, rather than Identity, oddly).
>
>
> Wilhelm K. Schwab, Ph.D.
> University of Florida
> Department of Anesthesiology
> PO Box 100254
> Gainesville, FL 32610-0254
>
> Email: [hidden email]
> Tel: (352) 846-1285
> FAX: (352) 392-7029
>
>


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] WeakArray and use of weak collections.

Igor Stasenko
On 25/02/2008, Gary Chambers <[hidden email]> wrote:
> It would be better for per-instance access to locking on weak collections
>  (like WeakRegistry does). For the moment, my #critical: works for us (was
>  previously no access to the semaphore for that on WeakArray class).
>

Yes, that's what i meant, its better to have per-instance access lock,
so locking single weakarray instance does not prevents from working
with another.

>  Stress is definitely the word (for working out what was going wrong!).
>
>
>  > -----Original Message-----
>  > From: [hidden email]
>
> > [mailto:[hidden email]]On Behalf Of Bill
>  > Schwab
>  > Sent: 25 February 2008 4:20 PM
>  > To: [hidden email]
>  > Subject: RE: [squeak-dev] WeakArray and use of weak collections.
>  >
>  >
>  > Gary,
>  >
>  > My simple-minded view of this is that anything with Shared or Weak in
>  > the name must be thread-safe.  The weak collections are manipulated by
>  > at least two threads, the caller and the weakling cleanup thread.
>  >
>  > Thanks for stress testing this!
>  >
>  > Bill
>  >
>  >
>  >
>  >
>  >
>  > Gary Chambers <gazzaguru2@...> wrote:
>  > If you can think of a better way of blocking if finalization is in
>  > progress...
>  > only WeakRegistry has its own protection semaphore at present. (uses
>  > WeakKeyDictionary, rather than Identity, oddly).
>  >
>  >
>  > Wilhelm K. Schwab, Ph.D.
>  > University of Florida
>  > Department of Anesthesiology
>  > PO Box 100254
>  > Gainesville, FL 32610-0254
>  >
>  > Email: [hidden email]
>  > Tel: (352) 846-1285
>  > FAX: (352) 392-7029
>  >
>  >
>
>
>


--
Best regards,
Igor Stasenko AKA sig.