• Abrar Shivani's avatar
    feat: Use existing Tokio runtime in components (#941) · 2a5eb7e7
    Abrar Shivani authored
    The runtime library already provides a from_current method that creates and returns a Runtime object initialized with the current Tokio runtime handle. Since components do not use the runtime library directly but access it through the worker, the worker needs to be updated to create itself using a Runtime instance derived from the current Tokio runtime.
    This PR updates the http component and the worker to use the existing Tokio runtime instead of creating a new one. Other components can be similarly updated to run using the existing runtime.
    2a5eb7e7
worker.rs 8.76 KB