Skip to content

Feature: Additional thread safe bus instance wrapper#304

Closed
felixdivo wants to merge 4 commits intodevelopfrom
feature-synchronized-bus
Closed

Feature: Additional thread safe bus instance wrapper#304
felixdivo wants to merge 4 commits intodevelopfrom
feature-synchronized-bus

Conversation

@felixdivo
Copy link
Copy Markdown
Collaborator

This PR adds a thread safe wrapper around existing interfaces. Calls to send() and recv() are locked independently.

# this
from can import Bus
bus = Bus(bustype='some_interface', channel='0')

# becomes this
from can import ThreadSafeBus
bus = ThreadSafeBus(bustype='some_interface', channel='0')

In that case, the locking of send_periodic() is disabled since it is redundant.

Testing and docs are still left to be done.

@felixdivo
Copy link
Copy Markdown
Collaborator Author

Okay, it does not work like that. Any help is appreciated.

@felixdivo
Copy link
Copy Markdown
Collaborator Author

I will wait a while with this until #277 gets finalized & merged.

@felixdivo felixdivo closed this May 22, 2018
@felixdivo felixdivo deleted the feature-synchronized-bus branch May 28, 2018 11:42
@felixdivo felixdivo restored the feature-synchronized-bus branch May 28, 2018 11:42
@felixdivo felixdivo deleted the feature-synchronized-bus branch May 28, 2018 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant