[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Resizing hash tables in Guile
From: |
Marius Vollmer |
Subject: |
Re: Resizing hash tables in Guile |
Date: |
12 Feb 2003 12:41:24 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 |
Roland Orre <address@hidden> writes:
> > I made the hash tables thread-safe (locking/unlocking a mutex at hash
> > table access and rehashing). Is that good? An alternativ is to
> > require of the programmer to make sure the hash tables aren't accessed
> > in parallel.
>
> In our case I think we will most likely set up the different processes
> to use different hash tables but we have still not parallellized our
> applications. Could/should the mutex protection maybe be optional?
Since users must consciously ask for resizable hash tables, we can
require them to do the locking themselves. Should we? I would say
yes, since people need to be aware of thread issues anyway, and maybe
they have a better scheme for ensuring thread safe access to a hash
table. Removing the locking from the core code should improve
performance, right?
However, the hash tables should be somewhat thread safe: they might
not work as advertised when multiple threads access them, but the
application might not crash. That is, adding an element from one
thread while another thread is doing the same thing might make one of
the elements disappear, but it must leave the hash table in a valid
state.
Do the non-resizing hash tables behgave that way, incidentally?
(Ahh, I just love cooperative threading. These things are so much
easier and efficient when there is only one running thread with
defined switch points... :-)
- Re: Efficiency and flexibility of hash-tables, (continued)
- Re: Efficiency and flexibility of hash-tables, Roland Orre, 2003/02/08
- Re: Efficiency and flexibility of hash-tables, Andreas Rottmann, 2003/02/10
- Re: Efficiency and flexibility of hash-tables, Greg Troxel, 2003/02/10
- Re: Efficiency and flexibility of hash-tables, Roland Orre, 2003/02/10
- Re: Efficiency and flexibility of hash-tables, Mikael Djurfeldt, 2003/02/10
- Re: Efficiency and flexibility of hash-tables, Mikael Djurfeldt, 2003/02/10
- Resizing hash tables in Guile, Mikael Djurfeldt, 2003/02/11
- Re: Resizing hash tables in Guile, Roland Orre, 2003/02/11
- Re: Resizing hash tables in Guile,
Marius Vollmer <=
- Re: Resizing hash tables in Guile, Marius Vollmer, 2003/02/12
- Re: Resizing hash tables in Guile, Mikael Djurfeldt, 2003/02/12
- Re: Resizing hash tables in Guile, Roland Orre, 2003/02/12
- Re: Resizing hash tables in Guile, Mikael Djurfeldt, 2003/02/13
- Re: Resizing hash tables in Guile, Harvey J. Stein, 2003/02/13
- Re: Resizing hash tables in Guile, Joris van der Hoeven, 2003/02/13
- Re: Resizing hash tables in Guile, Harvey J. Stein, 2003/02/13
- Re: Resizing hash tables in Guile, Paul Jarc, 2003/02/13
- Re: Resizing hash tables in Guile, Joris van der Hoeven, 2003/02/13
- Re: Resizing hash tables in Guile, Rob Browning, 2003/02/12