Run warp server and perform long running tasks in the background

If I want a long running piece of code and to run a warp server how could I achieve that ?

As an example I have the repository with code here

I need to call do_long_runing_thing() and have the warp server respond on the 3030 port.

One always blocks the other or warp stop responding on the port when in another thread.


You should be able to spawn it with tokio::spawn

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.