-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Normalize thread naming of threads in add-ons #8216
Comments
Many bindings append hostname and port number to the thread name. I think this is more meaningful than a number. I suggest to leave the part after the binding ID up to the binding developer. |
Yes that might be a better idea, to leave it to the developer. Maybe the ThingID and some additional info so one can see which thing has started the thread. Or just instead of bindingId use the thing UID. I'll update the text. |
I'd like to mention that the general advice is to NOT use any threads at all within bindings. Most things should be possible to solve with the existing Please keep that in mind for all binding reviews! |
Related to openhab#8216 Signed-off-by: Laurent Garnier <[email protected]>
Related to #8216 Signed-off-by: Laurent Garnier <[email protected]>
Related to openhab#8216 Signed-off-by: Laurent Garnier <[email protected]>
Related to #8216 Signed-off-by: Laurent Garnier <[email protected]>
@kaikreuzer my idea is to go through all bindings and see how threads are used and see if we can make them consistent. For example some use thread.start, while others use a single thread executor. Some use our thread executor to create a thread pool, others use the generic executor. I don't know what is preferred. But would like if we can make a general guideline. (Besides don't use a thead when not needed) Do you have an opinion about this? |
Related to openhab#8216 Signed-off-by: Laurent Garnier <[email protected]>
Related to openhab#8216 Signed-off-by: Laurent Garnier <[email protected]>
Related to openhab#8216 Signed-off-by: Laurent Garnier <[email protected]>
Related to openhab#8216 Signed-off-by: Laurent Garnier <[email protected]>
Related to #8216 Signed-off-by: Laurent Garnier <[email protected]>
@Hilbrand Yes, I think a general guidelines makes sense. |
Related to #8216 Signed-off-by: Laurent Garnier <[email protected]>
Related to openhab#8216 Signed-off-by: Laurent Garnier <[email protected]> Signed-off-by: MPH80 <[email protected]>
Related to openhab#8216 Signed-off-by: Laurent Garnier <[email protected]> Signed-off-by: MPH80 <[email protected]>
Related to openhab#8216 Signed-off-by: Laurent Garnier <[email protected]> Signed-off-by: MPH80 <[email protected]>
Related to openhab#8216 Signed-off-by: Laurent Garnier <[email protected]> Signed-off-by: MPH80 <[email protected]>
Related to #8216 Signed-off-by: Laurent Garnier <[email protected]>
Related to openhab#8216 Signed-off-by: Laurent Garnier <[email protected]> Signed-off-by: Bernhard <[email protected]>
Related to openhab#8216 Signed-off-by: Laurent Garnier <[email protected]> Signed-off-by: Bernhard <[email protected]>
Related to openhab#8216 Signed-off-by: Laurent Garnier <[email protected]> Signed-off-by: Daan Meijer <[email protected]>
Related to openhab#8216 Signed-off-by: Laurent Garnier <[email protected]>
Related to openhab#8216 Signed-off-by: Laurent Garnier <[email protected]>
Related to openhab#8216 Signed-off-by: Laurent Garnier <[email protected]>
Related to openhab#8216 Signed-off-by: Laurent Garnier <[email protected]>
Related to openhab#8216 Signed-off-by: Laurent Garnier <[email protected]>
Related to openhab#8216 Signed-off-by: Laurent Garnier <[email protected]>
Related to openhab#8216 Signed-off-by: Laurent Garnier <[email protected]>
Related to openhab#8216 Signed-off-by: Laurent Garnier <[email protected]>
Related to openhab#8216 Signed-off-by: Laurent Garnier <[email protected]>
Related to openhab#8216 Signed-off-by: Laurent Garnier <[email protected]>
Related to openhab#8216 Signed-off-by: Hilbrand Bouwkamp <[email protected]>
Related to openhab#8216 Signed-off-by: Hilbrand Bouwkamp <[email protected]>
Related to openhab#8216 Signed-off-by: Hilbrand Bouwkamp <[email protected]>
Related to #8216 Signed-off-by: Hilbrand Bouwkamp <[email protected]>
Related to openhab#8216 Signed-off-by: Hilbrand Bouwkamp <[email protected]> Signed-off-by: John Marshall <[email protected]>
Related to openhab#8216 Signed-off-by: Hilbrand Bouwkamp <[email protected]>
Related to openhab#8216 Signed-off-by: Hilbrand Bouwkamp <[email protected]>
How can we determine if all bindings have the thread name set correct? |
A number of add-ons start there own threads. To track threads better I propose these threads should all name their thread using a specific name convention. My proposal is to use:
OH-binding-<thingUID>
,OH-binding-<thingUID>-<custom>
. Wherecustom
is a developer defined word that suggest which specific thread it is.Some bindings use
Executors
. My suggested would be to either standardize to all use theorg.eclipse.smarthome.core.common. ThreadPoolManager
or another option to allow a genericExecutors
, but initialize with the openHABNamedThreadFactory
. The named thread factory/pool manager should than be initialized withbinding-<thingUID>
. Note that using the ThreadPoolManager` will add an incremental number to the thread name for each thread started.The text was updated successfully, but these errors were encountered: