tools/variations/cleanup_stale_fieldtrial_configs.py
def thread_func(thread_limiter, studies_map, study_name, configs):
  """Runs a limited number of tasks and updates the map with the results.

  Args:
    thread_limited: A lock used to limit the number of active threads.
    studies_map: The map where confirmed studies are added to.
    study_name: The name of the study to check.
    configs: The configs for the given study.

  Side-effect:
    This function adds the study to |studies_map| if it used.
  """
  thread_limiter.acquire()
  try:
    if is_study_used(study_name, configs):
      studies_map[study_name] = configs
  finally:
    thread_limiter.release()
Runs a limited number of tasks and updates the map with the results.

  Args:
    thread_limited: A lock used to limit the number of active threads.
    studies_map: The map where confirmed studies are added to.
    study_name: The name of the study to check.
    configs: The configs for the given study.

  Side-effect:
    This function adds the study to |studies_map| if it used.
  
Runs a limited number of tasks and updates the map with the results.
Runs a limited number of tasks and updates the map with the results .
def thread_func(thread_limiter, studies_map, study_name, configs):
  thread_limiter.acquire()
  try:
    if is_study_used(study_name, configs):
      studies_map[study_name] = configs
  finally:
    thread_limiter.release()
def thread_func ( thread_limiter , studies_map , study_name , configs ) : thread_limiter . acquire ( ) try : if is_study_used ( study_name , configs ) : studies_map [ study_name ] = configs finally : thread_limiter . release ( )
Runs a limited number of tasks and updates the map with the results.
Runs a limited number of tasks and updates the map with the results .
"""Runs a limited number of tasks and updates the map with the results.

  Args:
    thread_limited: A lock used to limit the number of active threads.
    studies_map: The map where confirmed studies are added to.
    study_name: The name of the study to check.
    configs: The configs for the given study.

  Side-effect:
    This function adds the study to |studies_map| if it used.
  """
thread_limiter
studies_map
The map where confirmed studies are added to.
The map where confirmed studies are added to .
study_name
The name of the study to check.
The name of the study to check .
configs
The configs for the given study.
The configs for the given study .
thread_limited
A lock used to limit the number of active threads.
A lock used to limit the number of active threads .