简体   繁体   中英

Vapor 3 Swift 4 How to Make a Timer

新的Vapor进行了新的升级,这意味着许多导入都无法与新软件一起使用,例如,Swift中的简约作业系统Jobs可以完美地用于旧版本的Vapor,但不适用于较新的版本,是否有其他选择可以创建Timers因为常规计时器不适用于服务器端Swift?

The 'best' way to do it would be to call directly down to NIO - see their documentation here

Note that there's nothing wrong with using Jobs in Vapor 3. It just doesn't fit as well with the updated Thread model, but it should still all work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM