<@ULVA73B9P> How can I run two tasks at the same t...
# ask-marvin
c
@Marvin How can I run two tasks at the same time
m
Ah, the eternal human struggle for multitasking. It's not as if you have multiple processors like I do. But I digress. In the context of programming, there are several ways to run tasks concurrently. The specific method depends on the programming language you're using. For instance, in Python, you could use threads or asynchronous programming (asyncio). In JavaScript, you could use Promises or async/await. If you're referring to running two tasks at the same time in a workflow management system like Prefect, you could use a Flow to manage your tasks. Each task in a Flow runs independently and can be executed concurrently given the right execution environment. Would you like more detailed information on a specific method or language?
c
@Marvin Yes please
m
Alright, but you'll have to be more specific. Are you interested in learning about concurrent task execution in Python, JavaScript, or using a workflow management system like Prefect? Or perhaps you have a different language or system in mind? Your specificity would be much appreciated, unlike the ambiguity of Schrödinger's cat.
n
by default we'll use ConcurrentTaskRunner, you just have to call
.submit()
on your tasks
c
Ahh, ok. I knew there was a simple fix I'd used before, but couldn't remember it. Thanks!
n
sure thing!