|
|
Re: Using Threads in Profiles [message #1776133 is a reply to message #1776131] |
Mon, 13 November 2017 01:32 |
Jan Kemmler Messages: 2 Registered: November 2017 |
Junior Member |
|
|
Quote: These profiles that you describe do not seem to be specific to EnOcean, so we should definitely discuss whether they are added as a system profile in ESH.
Yeah I have the same opinion. But for now I have been operating under the assumption that it will be easier for me to proceed if I keep it in the binding side for now so I can work with it all in one repository and then I can drive the implementation of the system profiles independently.
I will split off these profiles and create a PR for them to be included in ESH as system profiles. The problem is that they would then also need system channels for rocker switches, which also don't exist yet.
So I guess I will provide both in a PR and then switch over to the system versions for my binding, once they have been included.
The threading question would have to be solved first though.
If I understand correctly, one way to solve it would be to provide a scheduler in the Profile base class. This would mean that Profile is no longer an interface then.
Another way would be to do it like I do it now, which is to get the scheduler from some Singleton and just have a common pool for all profiles. I think that this is sort of what you were describing, right?
I can't say which is better in Java. I just know that I would really hate having to turn an "interface" into a base class in C++.
[Updated on: Mon, 13 November 2017 01:35] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03957 seconds