Openhab 3 - New thread per trigger? / Where do we discuss-ask questions about the openhab-core?

We presently don’t have a subtopic in the development area for questions about the core. I don’t think github is the right place to ask questions (but tell me if I am wrong).

Now for the question.
I am playing around with adding something to the rules engine and wanted to verify something that I was seeing in the latest code.

It appears (at least from what I can see) is that every trigger attached to every rule now has its own thread.

Is that the correct interpretation?

1 Like

For development questions GitHub is likely the correct place because not all OH developers use thus user oriented forum.

Maybe @Kai or @wborn could weigh in. I think they would need to weigh in if they want questions raised as issues because of the noise it could cause.

1 Like

I’m not familiar with this piece of code. But it is 5 years old and I think the JavaDoc on top of the class if pretty self explanatory. :wink:

Issue trackers are for tracking bugs and feature requests and not for support questions so just ask them here in the community.

Hey Brian, that’s an interesting line you are pointing to!

Is that the correct interpretation?

Almost - it imho says that there is one thread per rule (independent of the number of triggers of it).

But honestly, I don’t think this is good as it can lead to a huge number of idol threads, if the system has many rules defined.
It would probably much better to use a thread pool within the rule engine for that, wdyt?

Feel free to enter an issue for that in openhab-core.

I have created https://github.com/openhab/openhab-core/pull/1857 for this.

1 Like

Is there a way of configuring the rules thread pool size? I run a very large OH2 system on a dedicated PC that I intend to migrate at some stage and needed to drastically increase the rule threads due to the many things happening on the current setup

Yes! Just add threadpool:automation=50 to your conf/services/runtime.cfg file:

2 Likes

FTR, with the latest snapshot the threadpool has been removed again - due to valid concerns of @rlkoshak, see https://github.com/openhab/openhab-core/issues/1889.

1 Like

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.