tests.integration.test_thread_safety

tests.integration.test_thread_safety#

Ensure graph operations are thread-safe.

Functions

barricaded_call(barrier, func, *args, **kwargs)

Simple wrapper around a barricaded function call.

routine_cfb(graph_clrs09_22_6)

Test routine for concurrent-futures-build tests.

routine_cft(graph_clrs09_22_6, trav, ...)

Test routine for concurrent-futures-trav tests.

routine_universes()

Test routine for baseobject-in-universe thread safety.

test_concurrent_futures_build_fast(...)

Ensure writing to a graph is safe across many threads concurrently for 5 seconds.

test_concurrent_futures_build_slow(...)

Ensure writing to a graph is safe across many threads concurrently 128 times.

test_concurrent_futures_trav_fast(...)

Ensure reading from a graph is safe across many threads concurrently for 5 seconds.

test_concurrent_futures_trav_slow(...)

Ensure reading from a graph is safe across many threads concurrently, 512 times.

test_concurrent_futures_universe_fast()

Ensure BaseObject and Universe linkages are handled in a thread-safe manner, concurreently for 5 seconds (this is the fast version of the test).

test_concurrent_futures_universe_slow()

Ensure BaseObject and Universe linkages are safe across many threads concurrently; test runs 128 times.