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

virtual_can_demo.py changes #373

Merged
merged 3 commits into from
Jul 30, 2018
Merged

virtual_can_demo.py changes #373

merged 3 commits into from
Jul 30, 2018

Conversation

felixdivo
Copy link
Collaborator

No description provided.

@felixdivo felixdivo added this to the 2.3 Release milestone Jul 28, 2018
@felixdivo felixdivo self-assigned this Jul 28, 2018
@codecov
Copy link

codecov bot commented Jul 28, 2018

Codecov Report

Merging #373 into develop will decrease coverage by 1.76%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #373      +/-   ##
===========================================
- Coverage    58.85%   57.08%   -1.77%     
===========================================
  Files           54       57       +3     
  Lines         4214     4348     +134     
===========================================
+ Hits          2480     2482       +2     
- Misses        1734     1866     +132
Impacted Files Coverage Δ
can/interfaces/socketcan/socketcan.py 63.82% <0%> (-4.07%) ⬇️
can/util.py 72.63% <0%> (-3.78%) ⬇️
can/logger.py 0% <0%> (ø)
can/CAN.py 0% <0%> (ø)
can/player.py 0% <0%> (ø)

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 d9d3fa5...4ef03b4. Read the comment docs.


# TODO Issue #3: Need to keep running to ensure the writing threads stay alive. ?
time.sleep(2)
with can.ThreadSafeBus(bustype='socketcan', channel='vcan0') as bus:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'm missing something @felixdivo - what are you trying to protect by introducing the thread safe bus here?

As I understand it each executor function call (several will be running concurrently in separate processes) is creating its own can.ThreadSafeBus. If there are no threads sharing one ThreadSafeBus is there any point using it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, I was apparently confused.

@felixdivo felixdivo changed the title Made virtual_can_demo.py thread safe virtual_can_demo.py changes Jul 30, 2018
@felixdivo felixdivo merged commit cf5aa84 into develop Jul 30, 2018
@felixdivo felixdivo deleted the felixdivo-virtual-can-demo branch July 30, 2018 11:10
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.

2 participants