有一个长耗时任务,需要持续性的发送数据,发送的包收到回应后,继续发送下一包,如此反复,直到数据发送完。起始时没什么好的思路,线程的知识都不太记得了,wait nofity 等方法都好久没用过了,后面看了下廖雪峰的博客,把知识重新温习了一遍,便有了如下代码:
more >>那是一座悲欢离合聚集的楼。
缺失模块。
1、在博客根目录(注意不是yilia根目录)执行以下命令:
npm i hexo-generator-json-content --save
2、在根目录_config.yml里添加配置:
jsonContent: meta: false pages: false posts: title: true date: true path: true text: true raw: false content: false slug: false updated: false comments: false link: false permalink: false excerpt: false categories: false tags: true