Trying to implement hard termination in CLI Using...
# proj-sdk
q
Trying to implement hard termination in CLI Using multiprocessing (because hard terminating a thread is unsafe) The problem is that to start a process I need to be able to pickle the conversation object (which is not currently doable). Looked into it and the
EventLog
particularly is blocking the pickling ability Otherwise alternatively every time I run
conversation.run
in a process, I'd need to load the conversation from disk inside the process instead of passing conversation to the process as a pickled arg. This case requires reading from disk to be super fast, ideally events are read in parallel. Is this supported already?
w
is loading from disk really that expensive?
I can't imagine it's > 1s
q
its 1-2 seconds - maybe i'll profile to figure out what's taking so long (event reading was a guess) another downside is that loading the conversation always re-kicks some initialization logic (e.g mcp oauth flow, etc)
👍 1
w
high-level, multiprocessing seems like a very complicated thing to introduce here, given that we're only running 1 convo at a time @straight-sundown-84319 might have better idea on how to architect this
👍 1