dls-controls / pythonSoftIOC

Embed an EPICS IOC in a Python process
Apache License 2.0
32 stars 7 forks source link

Caput with callback #98

Closed AlexanderWells-diamond closed 1 year ago

AlexanderWells-diamond commented 1 year ago

Add blocking to the processing of on_update/on_update_name callbacks, to allow caput to correctly wait for processing to complete before returning.

Documented the new blocking flag on OUT record creation, and the SetBlocking function. I didn't document the CothreadDispatcher, as there's no reason for any users to explicitly create it themselves. Let me know if I should document it, or perhaps change its name to indicate its internal-only.

Tests written:

codecov[bot] commented 1 year ago

Codecov Report

Merging #98 (877a89c) into master (06d6b96) will increase coverage by 0.08%. The diff coverage is 91.89%.

@@            Coverage Diff             @@
##           master      #98      +/-   ##
==========================================
+ Coverage   87.63%   87.72%   +0.08%     
==========================================
  Files          13       14       +1     
  Lines         930      961      +31     
==========================================
+ Hits          815      843      +28     
- Misses        115      118       +3     
Impacted Files Coverage Δ
softioc/pythonSoftIoc.py 90.00% <ø> (ø)
softioc/cothread_dispatcher.py 80.00% <80.00%> (ø)
softioc/device.py 98.40% <93.75%> (-0.33%) :arrow_down:
softioc/asyncio_dispatcher.py 93.33% <100.00%> (+0.47%) :arrow_up:
softioc/builder.py 97.41% <100.00%> (+0.01%) :arrow_up:
softioc/imports.py 100.00% <100.00%> (ø)
softioc/softioc.py 77.57% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 06d6b96...877a89c. Read the comment docs.

github-actions[bot] commented 1 year ago

Unit Test Results

     15 files  ±  0       15 suites  ±0   21m 39s :stopwatch: + 1m 29s    230 tests +  5     224 :heavy_check_mark: +  5      6 :zzz: ±0  0 :x: ±0  3 450 runs  +75  3 010 :heavy_check_mark: +70  440 :zzz: +5  0 :x: ±0 

Results for commit 877a89c1. ± Comparison against base commit 06d6b96d.

:recycle: This comment has been updated with latest results.