Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ThreadPool* pool = createPool(4); // Intentionally ignoring the CORE * 2 + 1 rule.
- for(i = 0; i < 2; ++i) {
- Task task;
- task.deadline = 3; // in seconds.
- task.runnable = &echoTest;
- addTask(pool, &task);
- }
- for(i = 0; i < 10; ++i) {
- Task task;
- task.deadline = DONTCARE;
- task.runnable = &starve;
- addTask(pool, &task);
- }
Advertisement
Add Comment
Please, Sign In to add comment