question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is there any way to run two tasks simultaneously?

I’m not sure if this is an intended use case (continuous tasks).

I have a Bakefile like this:

launch/dev: launch/huey launch/flask

launch/huey:
    huey_consumer app.main

launch/flask:
    flask run

And my intention would be to run both launch/huey and launch/flask at the same time when launch/dev is called in, order to test an app.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
kennethreitzcommented, Sep 23, 2019
hello: hello/reuse hello/reuse/concurrent
    echo "You just ran $(red 'hello') directly, then indirectly (via bake+bash; 6 times, concurrently!)"
hello/basic:
    sleep 2
    echo "[$(red $(uuidgen))] hello!"
hello/reuse:
    bake hello/basic

hello/reuse/concurrent:
    bake hello/reuse &
    bake hello/reuse &
    bake hello/reuse &
    bake hello/reuse &
    bake hello/reuse &
    bake hello/reuse
$ bake hello
 + Executing hello/reuse:
 |  [C286C3C1-7C57-4FB1-8981-548A03BCD103] hello!
 + Executing hello/reuse/concurrent:
 |  [924F205E-11B6-43D1-8451-8FFBEE7A2536] hello!
 |  [3BDDC2E8-0329-4BC6-B8BB-D48506743E16] hello!
 |  [5C665A12-6CEF-431D-B9AE-76B217F17EA9] hello!
 |  [D71C2CB2-7C9A-4702-BD5C-EDCFCF4A9EC4] hello!
 |  [436F5009-B6AC-4C90-8E11-05E2F2BBED1C] hello!
 |  [D9BB86A7-A7A6-4ADE-8755-C21296B7AD84] hello!
 + Executing hello:
 |  You just ran hello directly, then indirectly (via bake+bash; 6 times, concurrently!)
 + Done.
1reaction
kennethreitzcommented, Sep 23, 2019
launch/dev:
    bake launch/huey & bake launch/flask

launch/huey:
    huey_consumer app.main

launch/flask:
    flask run

Make sure to use a latest release for this.

✨ 🍰 ✨

Read more comments on GitHub >

github_iconTop Results From Across the Web

Introduction to Synchronous and Asynchronous Processing
Synchronous execution means the first task in a program must finish processing before moving on to executing the next task whereas asynchronous ...
Read more >
Asynchronous vs synchronous execution. What is the ...
Asynchronous means they are totally independent and neither one must consider the other in any way, either in the initiation or in execution....
Read more >
Explanation: What is asynchronous code execution?
We refer to this as asynchronous execution, and it introduces the possibility for chaos into our otherwise orderly system. This is because the...
Read more >
async function - JavaScript - MDN Web Docs - Mozilla
The async and await keywords enable asynchronous, promise-based behavior to be written in a cleaner ... Async functions and execution order.
Read more >
Asynchronous programming: futures, async, await - Dart
How using async and await affects execution order. How to handle errors from an asynchronous call using try-catch expressions in async functions. Estimated...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found