marimo
marimo copied to clipboard
Interruptible RPCs
Description
Some RPCs, such as a table search on an extremely large dataframe, can be very expensive and lock up the kernel.
Suggested solution
Make RPCs interruptible in the UI — FE needs to know when an RPC is running and provide the user a way to stop it.
Alternative
No response
Additional context
No response
maybe dumb question - but why do RPCs need to lock the kernel? can the RPCs run in another thread?
RPCs are conceptually the same as run requests in that they can read and mutate the runtime's globals. If they ran in another thread, that could result in race conditions with other control requests, such as run requests and delete cell requests.