@@ -15,7 +15,7 @@ The database system is written in Python and attempts to simulate how a database
#### Synchronization in Python
Although you won't need to do any synchronization-related coding, it would be necessary for you to understand the basic Python synchronization primitives. The manual
explain this quite well: [https://docs.python.org/2/library/threading.html](High-level Threading Interface in Python). Some basics:
explains this quite well: [https://docs.python.org/3/library/threading.html](High-level Threading Interface in Python). Some basics:
- Each transaction for us will be started in a sepearate thread (see `testingLock.py` for some examples). The main command for doing so is: `threading.Thread`, which takes a function name as an argument.
- The main synchronization primitives are: `Lock` and `RLock` (Sections 16.2.2 and 16.2.3 in the manual above). You create them by calling `threading.Lock()` or `threading.RLock()`, and you use them by acquiring and releasing them. Only one thread can take a Lock or a RLock at any time.
- Two other primitives build on top of the above: `Conditions` and `Events`. See the manual for the details on those. We use `Conditions` in `transactions.py` to signal threads.