Plugin Helper: Thread
threadplugin helper manages threads and these threads are integrated with plugins. No need manual run or shutdown in the plugin.
Here is an example:
class ExampleOutput < Output
# 1. Load thread helper
# Omit `configure`, `shutdown` and other plugin APIs
# 2. Create and run thread with unique name.
The launched thread is managed by the plugin helper. No need of thread shutdown code in plugin's
shutdownmethod. It shutdowns the launched threads automatically.
This method creates a thread and runs it with the given routine.
titlemust be unique.
# Pass block directly
# Pass method object with existing method
Checks whether the current thread is running or not. This method is available in the running block.
If this article is incorrect or outdated, or omits critical information, please let us know. Fluentd is an open-source project under Cloud Native Computing Foundation (CNCF). All components are available under the Apache 2 License.