Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const child_process = require("child_process");
- async function Func(i){
- var r = '';
- var summ = 1;
- for(var i=0;i<10000000;i++) summ+=i;
- await console.log('Func ' + i + ': ' + r);
- return r;
- };
- function Broker(i){
- Func(i).then(function(){
- console.log('Broker')
- });
- return true;
- }
- async function Start(){
- var i = 0;
- do{
- await Broker(i)
- console.log('outside: ' + i++);
- if (i>5) break;
- }while(true)
- }
- Start();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement