Solución
solution.tsTypeScript
def choose_concurrency(task_type: str) -> str:
# Retorna "threading" para tareas I/O bound,
# "multiprocessing" para tareas CPU bound,
# y "unknown" para cualquier otro valor.
match task_type:
case "io_bound":
return "threading"
case "cpu_bound":
return "multiprocessing"
case _:
return "unknown"0respuestas