readme

来自「ace开发环境 用来开发网络程序 其运用了设计模式、多平台、C++等多种知识」· 代码 · 共 25 行

TXT
25
字号
This example is a very simple example, showing how to use the Kokyudispatcher to dispatch command objects in a FIFO manner. The testconfigures the Kokyu dispatcher with 3 FIFO lanes, each having adifferent priority. Typically this would be done by an RMS schedulerwhich assigns priorities to tasks based on the rate of tasks. Toensure that the command objects enqueued in the dispatcher aredispatched in the correct order, we enqueue the command objects and*then* activate the dispatcher. Only when the dispatcher is activated,the thread watching each dispatch queue starts running. To run this example, ./test -p<fifo|rr|other>The following is the expected outputPriority of command1 is 2Priority of command2 is 3Priority of command3 is 1command 3 executedcommand 1 executedcommand 2 executedNote that a lower number means a higher priority for the task.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?