marimo icon indicating copy to clipboard operation
marimo copied to clipboard

Interruptible RPCs

Open akshayka opened this issue 1 year ago • 2 comments

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

akshayka avatar Aug 22 '24 02:08 akshayka

maybe dumb question - but why do RPCs need to lock the kernel? can the RPCs run in another thread?

mscolnick avatar Aug 29 '24 15:08 mscolnick

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.

akshayka avatar Aug 29 '24 15:08 akshayka