https://prefect.io logo
c

Cody

09/14/2023, 9:20 PM
@Marvin How can I run two tasks at the same time
m

Marvin

09/14/2023, 9:20 PM
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

Cody

09/14/2023, 9:20 PM
@Marvin Yes please
m

Marvin

09/14/2023, 9:20 PM
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

Nate

09/14/2023, 9:21 PM
by default we'll use ConcurrentTaskRunner, you just have to call
.submit()
on your tasks
c

Cody

09/14/2023, 9:24 PM
Ahh, ok. I knew there was a simple fix I'd used before, but couldn't remember it. Thanks!
n

Nate

09/14/2023, 9:24 PM
sure thing!