Demonstrate a reentrant lru_cache call within a single thread
| 2047 | return x |
| 2048 | |
| 2049 | class DoubleEq: |
| 2050 | 'Demonstrate a reentrant lru_cache call within a single thread' |
| 2051 | def __init__(self, x): |
| 2052 | self.x = x |
| 2053 | def __hash__(self): |
| 2054 | return self.x |
| 2055 | def __eq__(self, other): |
| 2056 | if self.x == 2: |
| 2057 | test_func(DoubleEq(1)) |
| 2058 | return self.x == other.x |
| 2059 | |
| 2060 | test_func(DoubleEq(1)) # Load the cache |
| 2061 | test_func(DoubleEq(2)) # Load the cache |
no outgoing calls
searching dependent graphs…