spack/lib/spack/llnl/util
Todd Gamblin 6c9467e8c6 lock transactions: avoid redundant reading in write transactions
Our `LockTransaction` class was reading overly aggressively.  In cases
like this:

```
1  with spack.store.db.read_transaction():
2    with spack.store.db.write_transaction():
3      ...
```

The `ReadTransaction` on line 1 would read in the DB, but the
WriteTransaction on line 2 would read in the DB *again*, even though we
had a read lock the whole time.  `WriteTransaction`s were only
considering nested writes to decide when to read, but they didn't know
when we already had a read lock.

- [x] `Lock.acquire_write()` return `False` in cases where we already had
       a read lock.
2019-12-23 18:36:56 -08:00
..
cpu microarchitectures: fix ppc flags for clang (#14196) 2019-12-20 14:40:54 -08:00
tty Compiler search uses a pool of workers (#10190) 2019-06-07 09:57:26 -07:00
__init__.py copyright: update license headers for 2013-2019 copyright. 2019-01-01 00:44:28 -08:00
argparsewriter.py Fix argparse rST parsing of help messages (#14014) 2019-12-17 10:23:22 -08:00
filesystem.py Spec Header Dirs: Only first include/ (#13991) 2019-12-06 23:47:03 -08:00
lang.py Update llnl.util.lang.memoized so that Sphinx can extract signature (#11055) 2019-03-29 17:11:44 -07:00
link_tree.py link_tree: add option to merge link trees with relative targets 2019-05-26 18:23:44 -07:00
lock.py lock transactions: avoid redundant reading in write transactions 2019-12-23 18:36:56 -08:00
multiproc.py Compiler search uses a pool of workers (#10190) 2019-06-07 09:57:26 -07:00