MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / fixed_sequential_execution

Function fixed_sequential_execution

tests/test_orchestrator_semaphore.py:69–80  ·  view source on GitHub ↗

This is the FIXED pattern - both actions run in same semaphore context

()

Source from the content-addressed store, hash-verified

67 execution_log.append("child_end")
68
69 def fixed_sequential_execution():
70 """This is the FIXED pattern - both actions run in same semaphore context"""
71 print("1. Acquiring semaphore...")
72 with semaphore:
73 print("2. Semaphore acquired")
74 print("3. Executing parent action...")
75 parent_action()
76 print("4. Parent complete, executing child action...")
77 # Child runs in SAME semaphore context - no re-acquisition needed
78 child_action()
79 print("5. Child complete")
80 print("6. Semaphore released")
81
82 thread = threading.Thread(target=fixed_sequential_execution)
83 thread.start()

Callers

nothing calls this directly

Calls 2

parent_actionFunction · 0.70
child_actionFunction · 0.70

Tested by

no test coverage detected