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

Consider thread safety #4

Open
StokesMIDE opened this issue Jun 18, 2020 · 2 comments
Open

Consider thread safety #4

StokesMIDE opened this issue Jun 18, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@StokesMIDE
Copy link
Member

Thread safety is in idelib is minimal and inconsistent. It's not (yet?) a serious problem, but it could be in the future. Some handing of race conditions was added to address specific problems, but it's a hack. Use a threading.RLock around adding/ending a Session, updating/using Transforms, appending/accessing EventArray data, etc. Also consider making some flag variables (like Dataset.loading) properties that get/set a threading.Event.

@StokesMIDE
Copy link
Member Author

Note: Some of the race conditions that were hacked around in the past were resolved after changing the EBML library to ebmlite. Existing thread-safety things should be reexamined.

@CFlaniganMide CFlaniganMide transferred this issue from another repository Jul 21, 2020
@CFlaniganMide CFlaniganMide transferred this issue from another repository Jul 21, 2020
@StokesMIDE StokesMIDE added the enhancement New feature or request label Jul 21, 2020
@CFlaniganMide
Copy link
Contributor

An update regarding thread safety:

As of #49 , Each channel has a lock used when reading or writing data. Specifically, the EventArray methods append, accessCache, and fillCache when manipulating the _data member. This should be added in more places, but it's a good start.

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

No branches or pull requests

2 participants