MCPcopy
hub / github.com/circlemind-ai/fast-graphrag / get_event_loop

Function get_event_loop

fast_graphrag/_utils.py:56–64  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

54
55
56def get_event_loop() -> asyncio.AbstractEventLoop:
57 try:
58 # If there is already an event loop, use it.
59 loop = asyncio.get_event_loop()
60 except RuntimeError:
61 # If in a sub-thread, create a new event loop.
62 loop = asyncio.new_event_loop()
63 asyncio.set_event_loop(loop)
64 return loop
65
66
67def extract_sorted_scores(

Callers 7

targetMethod · 0.90
insertMethod · 0.90
queryMethod · 0.90
save_graphmlMethod · 0.90
graph_benchmark.pyFile · 0.90
vdb_benchmark.pyFile · 0.90

Calls

no outgoing calls

Tested by 2

targetMethod · 0.72