MCPcopy Create free account
hub / github.com/CScorza/IntelOSINT / get_telethon_loop

Function get_telethon_loop

IntelOSINT.py:314–327  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

312 loop.run_forever()
313
314def get_telethon_loop():
315 global telethon_loop, _telethon_thread
316 if telethon_loop is not None and _telethon_thread is not None and _telethon_thread.is_alive():
317 return telethon_loop
318 with _telethon_loop_lock:
319 if telethon_loop is None or _telethon_thread is None or not _telethon_thread.is_alive():
320 telethon_loop = asyncio.new_event_loop()
321 _telethon_thread = threading.Thread(
322 target=_start_background_loop,
323 args=(telethon_loop,),
324 daemon=True
325 )
326 _telethon_thread.start()
327 return telethon_loop
328
329def run_async(coro):
330 loop = get_telethon_loop()

Callers 6

run_asyncFunction · 0.85
_monitor_loopMethod · 0.85
tg_send_codeMethod · 0.85
analyze_telegramMethod · 0.85
analyze_phoneMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected