Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thread-safe access #952

Draft
wants to merge 12 commits into
base: master
Choose a base branch
from
Draft

Thread-safe access #952

wants to merge 12 commits into from

Conversation

bilderbuchi
Copy link
Member

@bilderbuchi bilderbuchi commented Jul 22, 2023

Closes #506, supersedes #608.

  • Also guard CommonBase.binary_values and binary methods in general
  • Need more thread-safety in manipulating ThreadedAccessTester?
  • Maybe smoother to fake comms with pyvisa-sim?
  • Add tests using many-thread concurrent access without special methods with interrupt points (FakeInstrument? pyvisa-sim?)
  • Check if we can monkeypatch out the RLock with some smart fixture use to confirm that all current threading tests that pass with the lock fail without it. This confirms that the tests really catch the threading problems as intended (and don't pass accidentally).
  • Add documentation
  • Clean up code
  • Testing

@bilderbuchi bilderbuchi changed the title Threaded access Thread-safe access Jul 22, 2023
@bilderbuchi
Copy link
Member Author

bilderbuchi commented Jul 22, 2023

@bmoneke I think I need your help -- my tests uncovered that the Keithley2306 Relay (

) should be a Channel, and also probably that custom Channel ( ) should inherit from the pymeasure one.
I guess we overlooked that one during the Channel transition. Can I fix this quickly without getting bogged down, or is that more restructuring work, in your opinion?

edit: see #953

@BenediktBurger
Copy link
Member

I guess we overlooked that one during the Channel transition.

We added channels, but never moved all instruments to channels, see #746

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Thread safe communication
2 participants