3 ms·
Nice approach! I'm intrigued by the ability to start execution from a particular task. One thing I like about LangGraph is the declarative state merging. In t
by scribu 2y ago
Nice approach!
I'm intrigued by the ability to start execution from a particular task.
One thing I like about LangGraph is the declarative state merging. In the MapReduce example, how do you guarantee that the collector.append() operation is thread-safe?
- skull8888888 2y agoAlso curious, what kind of agents are you building with LangGraph. Would be more than happy to help you onboard to Flow!
- skull8888888 2y agoThank you! Good question. Behind the scenes, state is manage via Semaphore. So each call to .get(...) acquires a semaphore with a single permit so it essentially guarantees thread-safety. Check out how the state is implemented here https://github.com/lmnr-ai/flow/blob/main/src/lmnr_flow/state.py https://github.com/lmnr-ai/flow/blob/main/src/lmnr_flow/stat...