The following tasks did not complete: first Did you forget to signal async completion?

简介: The following tasks did not complete: first Did you forget to signal async completion?

The following tasks did not complete: first Did you forget to signal async completion?

在使用gulp执行task的时候,使用匿名函数经常出现以下错误:

两种解决办法

方法一:这个是最简单的一种方法使用done来进行回调,gulp会自动将这个回调函数作为一个参数返回到任务中,在完成的时候一定要调用这个函数。如下:

方法二 :在异步请求机制中,是有一个Promise对象的,它包含了请求的过程中所有内容。如下:


相关文章
已解决 RuntimeError: There is no current event loop in thread ‘Thread-1‘.
Jetson Xavier NX 报错 RuntimeError: There is no current event loop in thread 'Thread-1'.异常错误,已解决
620 0
已解决 RuntimeError: There is no current event loop in thread ‘Thread-1‘.
ResizeObserver loop completed with undelivered notifications
ResizeObserver loop completed with undelivered notifications
|
6月前
|
Python
【ERROR】asyncio.run(main())报错:RuntimeError: Event loop is closed
【ERROR】asyncio.run(main())报错:RuntimeError: Event loop is closed
184 0
|
Java Spring
Redisson BUG: Failed to submit a listener notification task. Event loop shut down?
Redisson BUG: Failed to submit a listener notification task. Event loop shut down?
1455 0
Error:svn:E155037:Previous operation has not finished; run ‘cleanup‘ if it was interrupted(完美解决)
Error:svn:E155037:Previous operation has not finished; run ‘cleanup‘ if it was interrupted(完美解决)
436 0
Error:svn:E155037:Previous operation has not finished; run ‘cleanup‘ if it was interrupted(完美解决)
async和await用法(Task)
原文:async和await用法 要理解async和await的用法,首先要了解Task相关知识,这里不做说明,因为这不是本文的重点。 如果你已经对Task很了解,那么如何使用async和await,在此主要总结了以下三点: 只有在async方法里面才能使用await操作符; await操作符是针对Task对象的; 当方法A调用方法B,方法B方法体内又通过await调用方法C时,如果方法C内部有异步操作,则方法B会等待异步操作执行完,才往下执行;但方法A可以继续往下执行,不用再等待B方法执行完。
1335 0
|
Python
may have been in progress in another thread when fork() was called.
may have been in progress in another thread when fork() was called.
142 0
may have been in progress in another thread when fork() was called.
|
Linux
lvm[12446]: Another thread is handling an event. Waiting
在检查一Linux服务器时,发现日志里面有大量“lvm[12446]: Another thread is handling an event. Waiting...” Jul  4 00:01:42 localhost lvm[12446]: Another thread is handling an event.
1036 0
|
SQL XML 数据格式

热门文章

最新文章