STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
test_controller_compute_lock Namespace Reference

Classes

class  _Stop
class  FakeController

Functions

bool _lock_held ()
 fake (monkeypatch)
 test_a_streams_controller_is_built_and_stepped_under_the_lock (fake)
 test_reset_waits_for_the_lock (fake)

Variables

 reason
str EMAIL = "controller-lock@berkeley.edu"
dict H = {"X-Auth-Email": EMAIL}

Detailed Description

One user's controller is touched by one request at a time: the streams and /reset too.

1298bf7a moved /init, /step, /simulate and /simulate-layer2 into ``run_compute`` (the thread pool,
under the session's compute lock) and the SSE streams' controller steps onto bare pool threads.
On the event loop the two kinds could only interleave between steps; on a bare thread a stream's
step ran beside a /simulate or /reset of the same ``session.controller`` from another tab, mid-step.

Function Documentation

◆ _lock_held()

bool test_controller_compute_lock._lock_held ( )
protected

◆ fake()

test_controller_compute_lock.fake ( monkeypatch)

Definition at line 56 of file test_controller_compute_lock.py.

◆ test_a_streams_controller_is_built_and_stepped_under_the_lock()

test_controller_compute_lock.test_a_streams_controller_is_built_and_stepped_under_the_lock ( fake)

Definition at line 63 of file test_controller_compute_lock.py.

◆ test_reset_waits_for_the_lock()

test_controller_compute_lock.test_reset_waits_for_the_lock ( fake)

Definition at line 77 of file test_controller_compute_lock.py.

Variable Documentation

◆ EMAIL

str test_controller_compute_lock.EMAIL = "controller-lock@berkeley.edu"

Definition at line 22 of file test_controller_compute_lock.py.

◆ H

dict test_controller_compute_lock.H = {"X-Auth-Email": EMAIL}

Definition at line 23 of file test_controller_compute_lock.py.

◆ reason

test_controller_compute_lock.reason

Definition at line 14 of file test_controller_compute_lock.py.