threading / _thread 原生线程和同步原语。
固定源码版本:2f2318653f6f794dddd321eff7c9d4b7b174643f。本表共 71 条静态出现记录;不是运行次数。
同一个直接 API 表达式只记为 api_call 或 api_reference 中的一类。实例候选不计入直接原生 API 总数。
| ID | 位置 / 快照 | 所属符号 | 种类 | API / 语法 | 来源判定 | 源码行 |
|---|---|---|---|---|---|---|
| occ-000468 | slime/agent/aiohttp_threaded.py:6 · 快照 | <module> | import | threading | explicit_import | import threading |
| occ-000469 | slime/agent/aiohttp_threaded.py:29 · 快照 | AppHandle | api_reference | threading.Thread | lexical_import_resolution | thread: threading.Thread |
| occ-000477 | slime/agent/aiohttp_threaded.py:61 · 快照 | run_app_in_thread | api_call | threading.Event | lexical_import_resolution | started = threading.Event() |
| occ-000486 | slime/agent/aiohttp_threaded.py:87 · 快照 | run_app_in_thread | api_call | threading.Thread | lexical_import_resolution | thread = threading.Thread(target=_run, name=thread_name, daemon=True) |
| occ-000569 | slime/backends/megatron_utils/server/megatron_server.py:3 · 快照 | <module> | import | threading | explicit_import | import threading |
| occ-000638 | slime/backends/megatron_utils/server/megatron_server.py:616 · 快照 | _start_http_server | api_call | threading.Thread | lexical_import_resolution | stats_thread = threading.Thread( |
| occ-000734 | slime/data/archive.py:56 · 快照 | RolloutArchive.save | import | threading | explicit_import | import threading |
| occ-000735 | slime/data/archive.py:66 · 快照 | RolloutArchive.save | api_call | threading.RLock | lexical_import_resolution | codec, lock = SampleCodec(store, args=args), threading.RLock() |
| occ-000747 | slime/data/queue_data_source.py:16 · 快照 | <module> | import | threading | explicit_import | import threading |
| occ-000754 | slime/data/queue_data_source.py:147 · 快照 | RolloutQueueController.init | api_call | threading.Lock | lexical_import_resolution | self._producer_lock = threading.Lock() |
| occ-000755 | slime/data/queue_data_source.py:153 · 快照 | RolloutQueueController.init | api_call | threading.RLock | lexical_import_resolution | self._training_lock = threading.RLock() |
| occ-000756 | slime/data/queue_data_source.py:154 · 快照 | RolloutQueueController.init | api_call | threading.Event | lexical_import_resolution | self._gc_stop = threading.Event() |
| occ-000757 | slime/data/queue_data_source.py:184 · 快照 | RolloutQueueController._start_gc | api_call | threading.Thread | lexical_import_resolution | self._gc_thread = threading.Thread(target=self._gc_loop, name=“straw-gc”, daemon=True) |
| occ-000799 | slime/data/queue_data_source.py:1034 · 快照 | QueueReader.init | api_call | threading.RLock | lexical_import_resolution | self._lock = threading.RLock() |
| occ-000801 | slime/data/queue_data_source.py:1036 · 快照 | QueueReader.init | api_call | threading.Event | lexical_import_resolution | self._stop = threading.Event() |
| occ-000802 | slime/data/queue_data_source.py:1044 · 快照 | QueueReader.init | api_call | threading.Thread | lexical_import_resolution | self._heartbeats = threading.Thread(target=self._heartbeat_loop, name=“queue-leases”, daemon=True) |
| occ-000824 | slime/data/transport.py:8 · 快照 | <module> | import | threading | explicit_import | import threading |
| occ-000825 | slime/data/transport.py:25 · 快照 | <module> | api_call | threading.Lock | lexical_import_resolution | _writers_lock = threading.Lock() |
| occ-000830 | slime/data/transport.py:105 · 快照 | rollout_store | api_call | threading.RLock | lexical_import_resolution | _writers[key] = (store, threading.RLock()) |
| occ-000911 | slime/rollout/fully_async_distributed.py:6 · 快照 | <module> | import | threading | explicit_import | import threading |
| occ-000912 | slime/rollout/fully_async_distributed.py:60 · 快照 | RolloutScheduler.init | api_call | threading.Condition | lexical_import_resolution | self.condition = threading.Condition() |
| occ-000924 | slime/rollout/fully_async_distributed.py:177 · 快照 | RolloutScheduler.generate | api_call | threading.Thread | lexical_import_resolution | self.thread = threading.Thread(target=self._run, name=“rollout-collect”, daemon=True) |
| occ-001024 | slime/rollout/fully_async_rollout.py:34 · 快照 | <module> | import | threading | explicit_import | import threading |
| occ-001027 | slime/rollout/fully_async_rollout.py:88 · 快照 | AsyncRolloutWorker.init | api_call | threading.Condition | lexical_import_resolution | self.condition = threading.Condition() |
| occ-001030 | slime/rollout/fully_async_rollout.py:99 · 快照 | AsyncRolloutWorker.init | api_reference | threading.Thread | lexical_import_resolution | self.worker_thread: threading.Thread | None = None |
| occ-001032 | slime/rollout/fully_async_rollout.py:106 · 快照 | AsyncRolloutWorker.start | api_call | threading.Thread | lexical_import_resolution | self.worker_thread = threading.Thread(target=self._thread_main, name=“fully-async-rollout”, daemon=True) |
| occ-001191 | slime/utils/accelerator/init.py:14 · 快照 | <module> | import | threading | explicit_import | import threading |
| occ-001192 | slime/utils/accelerator/init.py:39 · 快照 | <module> | api_call | threading.RLock | lexical_import_resolution | _SELECTION_LOCK = threading.RLock() |
| occ-001197 | slime/utils/async_utils.py:2 · 快照 | <module> | import | threading | explicit_import | import threading |
| occ-001208 | slime/utils/async_utils.py:49 · 快照 | AsyncLoopThread.init | api_call | threading.Thread | lexical_import_resolution | self._thread = threading.Thread(target=self._start_loop, daemon=True) |
| occ-001218 | slime/utils/health_monitor.py:2 · 快照 | <module> | import | threading | explicit_import | import threading |
| occ-001219 | slime/utils/health_monitor.py:27 · 快照 | RolloutHealthMonitor.init | api_call | threading.Event | lexical_import_resolution | self._stop_event = threading.Event() |
| occ-001220 | slime/utils/health_monitor.py:28 · 快照 | RolloutHealthMonitor.init | api_call | threading.Event | lexical_import_resolution | self._pause_event = threading.Event() |
| occ-001222 | slime/utils/health_monitor.py:34 · 快照 | RolloutHealthMonitor.init | api_call | threading.Lock | lexical_import_resolution | self._check_lock = threading.Lock() |
| occ-001225 | slime/utils/health_monitor.py:53 · 快照 | RolloutHealthMonitor.start | api_call | threading.Thread | lexical_import_resolution | self._thread = threading.Thread( |
| occ-001296 | slime/utils/routed_experts.py:4 · 快照 | <module> | import | threading | explicit_import | import threading |
| occ-001305 | slime/utils/routed_experts.py:213 · 快照 | RoutedExpertsMicrobatch.init | api_call | threading.Lock | lexical_import_resolution | self._lock = threading.Lock() |
| occ-001311 | slime_plugins/rollout_buffer/buffer.py:6 · 快照 | <module> | import | threading | explicit_import | import threading |
| occ-001314 | slime_plugins/rollout_buffer/buffer.py:232 · 快照 | RolloutBuffer.init | api_call | threading.RLock | lexical_import_resolution | self.lock = threading.RLock() |
| occ-001315 | slime_plugins/rollout_buffer/buffer.py:233 · 快照 | RolloutBuffer.init | api_call | threading.Condition | lexical_import_resolution | self.not_empty = threading.Condition(self.lock) |
| occ-001404 | tests/pipeline_rl_test_helpers.py:5 · 快照 | <module> | import | threading | explicit_import | import threading |
| occ-001407 | tests/pipeline_rl_test_helpers.py:46 · 快照 | GenerationProbe.init | api_call | threading.Condition | lexical_import_resolution | self.condition = threading.Condition() |
| occ-001408 | tests/pipeline_rl_test_helpers.py:49 · 快照 | GenerationProbe.init | api_call | threading.Thread | lexical_import_resolution | self.thread = threading.Thread(target=self.run, daemon=True) |
| occ-001632 | tests/test_distributed_rollout.py:9 · 快照 | <module> | import | threading | explicit_import | import threading |
| occ-001656 | tests/test_distributed_rollout.py:602 · 快照 | test_slow_task_acquire_does_not_block_async_generation | api_call | threading.Event | lexical_import_resolution | entered, release = threading.Event(), threading.Event() |
| occ-001657 | tests/test_distributed_rollout.py:602 · 快照 | test_slow_task_acquire_does_not_block_async_generation | api_call | threading.Event | lexical_import_resolution | entered, release = threading.Event(), threading.Event() |
| occ-001676 | tests/test_distributed_rollout.py:672 · 快照 | scheduler_factory.create | api_call | threading.Event | lexical_import_resolution | release = threading.Event() |
| occ-001697 | tests/test_distributed_rollout.py:811 · 快照 | test_slow_worker_control_does_not_block_collection_or_close | api_call | threading.Event | lexical_import_resolution | entered = threading.Event() |
| occ-001787 | tests/test_distributed_rollout.py:2010 · 快照 | test_background_gc_failure_stops_queue_work_and_fails_close | api_call | threading.Thread | lexical_import_resolution | controller._gc_thread = threading.Thread(target=controller._gc_loop) |
| occ-001824 | tests/test_fully_async_rollout.py:23 · 快照 | <module> | import | threading | explicit_import | import threading |
| occ-001833 | tests/test_fully_async_rollout.py:218 · 快照 | test_done_callback_never_blocks_event_loop_thread | api_call | threading.Thread | lexical_import_resolution | pusher = threading.Thread(target=_push_all, daemon=True) |
| occ-001863 | tests/test_published_payload_retry.py:5 · 快照 | <module> | import | threading | explicit_import | import threading |
| occ-001867 | tests/test_published_payload_retry.py:36 · 快照 | test_result_and_shelve_payloads_recover_at_the_storage_layer | api_call | threading.Timer | lexical_import_resolution | timer = threading.Timer(0.05, restore) |
| occ-001984 | tests/test_score_centering_binary.py:3 · 快照 | <module> | import | threading | explicit_import | import threading |
| occ-001985 | tests/test_score_centering_binary.py:96 · 快照 | test_http_worker_decodes_off_event_loop | api_call | threading.get_ident | lexical_import_resolution | main_thread = threading.get_ident() |
| occ-001986 | tests/test_score_centering_binary.py:101 · 快照 | test_http_worker_decodes_off_event_loop.decode | api_call | threading.get_ident | lexical_import_resolution | calls.append(threading.get_ident()) |
| occ-002060 | tests/test_straw_fully_async_recovery.py:15 · 快照 | <module> | import | threading | explicit_import | import threading |
| occ-002073 | tests/test_straw_fully_async_recovery.py:132 · 快照 | _run_job | api_call | threading.Thread | lexical_import_resolution | thread = threading.Thread(target=generate, daemon=True) |
| occ-002075 | tests/test_straw_fully_async_recovery.py:158 · 快照 | _run_job | api_call | threading.Event | lexical_import_resolution | threading.Event().wait() |
| occ-002092 | tests/test_straw_r3.py:2 · 快照 | <module> | import | threading | explicit_import | import threading |
| occ-002095 | tests/test_straw_r3.py:143 · 快照 | test_cancelled_straw_publication_drains_before_releasing_capacity | api_call | threading.Event | lexical_import_resolution | entered, release = threading.Event(), threading.Event() |
| occ-002096 | tests/test_straw_r3.py:143 · 快照 | test_cancelled_straw_publication_drains_before_releasing_capacity | api_call | threading.Event | lexical_import_resolution | entered, release = threading.Event(), threading.Event() |
| occ-002230 | tests/test_training_recovery.py:292 · 快照 | test_recovery_e2e_contacts_dashboard_without_proxy | import | threading | explicit_import | import threading |
| occ-002233 | tests/test_training_recovery.py:339 · 快照 | test_recovery_e2e_contacts_dashboard_without_proxy | api_call | threading.Thread | lexical_import_resolution | thread = threading.Thread(target=server.serve_forever, daemon=True) |
| occ-002249 | tools/convert_hf_to_fp8.py:22 · 快照 | <module> | import | threading | explicit_import | import threading |
| occ-002251 | tools/convert_hf_to_fp8.py:105 · 快照 | ConversionResult.init | api_call | threading.Lock | lexical_import_resolution | self.lock = threading.Lock() |
| occ-002255 | tools/convert_hf_to_int4_direct.py:16 · 快照 | <module> | import | threading | explicit_import | import threading |
| occ-002257 | tools/convert_hf_to_int4_direct.py:158 · 快照 | ConversionResult.init | api_call | threading.Lock | lexical_import_resolution | self.lock = threading.Lock() |
| occ-002262 | tools/convert_torch_dist_to_hf_parallel.py:8 · 快照 | <module> | import | threading | explicit_import | import threading |
| occ-002265 | tools/convert_torch_dist_to_hf_parallel.py:43 · 快照 | WrappedStorageReader.init | api_call | threading.Lock | lexical_import_resolution | self._cache_lock = threading.Lock() if max_workers and max_workers > 1 else None |
| occ-002272 | tools/convert_torch_dist_to_hf_parallel.py:284 · 快照 | save_tensors | api_call | threading.Lock | lexical_import_resolution | lock = threading.Lock() |