Skip to content

Thread pinning doesn't seem to work as intended. #2343

@vlebourl

Description

@vlebourl

What happened?

I have a lot of listen_state in different apps that cause the following error:

 PinOutofRange: Pin thread -1 out of range. Must be between 0 and 5

(I do have 6 threads in my appdaemon.yml).

I tried adding explicit pinning like so:

        self.handle = self.listen_state(
            self.write_rest_score, "input_button.write_rest_score",
            pin_thread=1
        )

but it only results in a warning:

Invalid thread ID for pinned thread in app: xxx - assigning to thread 0

i'm a bit lost as I didn't have to do that previously on AppDaemon add-on version 0.16, but now it's all assigned to thread 0 which kinda defeats the purpose of having 6 cores available...

Version

4.5.7

Installation type

Home Assistant add-on

Relevant log output

Relevant code in the app or config file that caused the issue

Anything else?

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions