it is almost trivial to write nifs which yield and continue, enif_schedule_nif exists for this purpose.
nifs are ideal for operations which mutate binaries, eg hashing or unmasking a websocket frame
nifs are ideal for operations which mutate binaries, eg hashing or unmasking a websocket frame
There's some some parameters in there that are going to be tricky to set up correctly (number of workers in the pool for a given NIF has a lot of implications at scale), but in the end it's not significantly different than communicating to a separate process on the some machine; it's all the same resources being used.