How Create a Scheduler (e.g. to schedule tweets, or an api request)

后端 未结 4 817
伪装坚强ぢ
伪装坚强ぢ 2021-01-14 00:45

I have a table of schedule items, they may be scheduled for the same time. I\'m wondering how to have them all execute at the correct time when:

The problem I see is

4条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-14 01:35

    Unless you take steps to take advantage of the asynchronous APIs that exist for all IO operations, your only approach is to use many threads. Consider the .net ThreadPool as this can increase the number of threads when too many work items are queued. There will be a limit here, as the ThreadPool spins up extra threads relatively slowly. Under sustained overload, your system will groan. Like I said, the best way to approach this is with asynchronous IO.

提交回复
热议问题