hardbyte / hardbyte/python-can

Receiving queue from different threads on same channel

Offen
#716 6 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
question
Vorherrschende Sprache
Python
Sterne
1.6k
Forks
697
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Hi guys,

I´m always facing errors working on different threads on the same hw channel.

Let me explain:
Imagine you have one hw channel e.g Kvaser HW Channel 0. On which you want to work on different threads. Usually one HW channel has only one internal queue. Which means runnning once the function Bus.recv() on thread1 will always remove the received message from the HW queue. The issue now is, that thread2 is not able to receive the same message, because they share the HW queue.

The ThreadSafeBus class can´t solve this issue, because it is only blocking the access to the resource.

Had anyone else the same errors ? If yes, have you found an

Thank you ;)

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.