Skip to content

Commit

Permalink
[muxcable] Remove Xcvrd Sleep (sonic-net#174)
Browse files Browse the repository at this point in the history
When using redis select, xcvrd is sleeping for 100 msec which appears
unnecessary after process all content of selectable objects.

signed-off-by: Tamer Ahmed <[email protected]>
  • Loading branch information
tahmed-dev authored May 11, 2021
1 parent cc3803f commit d0be634
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions sonic-xcvrd/xcvrd/xcvrd_utilities/y_cable_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"""

import threading
import time

from sonic_py_common import daemon_base, logger
from sonic_py_common import multi_asic
Expand Down Expand Up @@ -1038,11 +1037,6 @@ def task_worker(self):
# Use timeout to prevent ignoring the signals we want to handle
# in signal_handler() (e.g. SIGTERM for graceful shutdown)

# A brief sleep appears necessary in this loop or any spawned
# update threads will get stuck. Appears to be due to the sel.select() call.
# TODO: Eliminate the need for this sleep.
time.sleep(0.1)

(state, selectableObj) = sel.select(SELECT_TIMEOUT)

if state == swsscommon.Select.TIMEOUT:
Expand Down

0 comments on commit d0be634

Please sign in to comment.