Javascript Grunt子任务并行运行

Javascript Grunt子任务并行运行,javascript,asynchronous,gruntjs,Javascript,Asynchronous,Gruntjs,根据,任务可以是异步的。 在我的例子中,我有一些任务,每个任务都有几个按顺序运行的子任务(或目标) 例如: copy: { foo: { // concat task "foo" target options and files go here. }, bar: { // concat task "bar" target options and files go here. } } 但是copy:foo花费的时间太长,所以我希望cop

根据,任务可以是异步的。 在我的例子中,我有一些任务,每个任务都有几个按顺序运行的子任务(或目标)

例如:

copy: {
    foo: {
      // concat task "foo" target options and files go here.
    },
    bar: {
      // concat task "bar" target options and files go here.
    }
  }
但是
copy:foo
花费的时间太长,所以我希望copy的子任务并行运行。可能吗

是的。使用

setTimeout(your_func1, 0);
setTimeout(your_func2, 0)

你能说得更具体些吗?什么是
您的函数1
?它是没有括号的函数名,如copy.foo或copy.bar