added priorityManager to rockspec
This commit is contained in:
parent
ffaab32d5e
commit
7b0cb7a853
@ -1,9 +1,10 @@
|
||||
# Multi Version: 16.0.0 - Getting the priorities straight
|
||||
# Multi Version: 16.0.0 - Connecting the dots
|
||||
**Key Changes**
|
||||
- Expanded connection logic
|
||||
- New integration priorityManager
|
||||
- Tests for threads
|
||||
- Consistent behavior between the threading integrations
|
||||
- Improved love2d threading
|
||||
- Bug fixes
|
||||
|
||||
Found an issue? Please [submit it](https://github.com/rayaman/multi/issues) and someone will look into it!
|
||||
|
||||
@ -60,14 +60,6 @@ Table of contents
|
||||
|
||||
# Update 16.0.0 - Getting the priorities straight
|
||||
|
||||
Full Update Showcase
|
||||
---
|
||||
|
||||
```lua
|
||||
multi, thread = require("multi"):init{print=true}
|
||||
GLOBAL, THREAD = require("multi.integration.lanesManager"):init()
|
||||
```
|
||||
|
||||
## Added New Integration: **priorityManager**
|
||||
|
||||
Allows the user to have multi auto set priorities (Requires chronos). Also adds the functionality to create your own runners (multi:mainloop(), multi:umanager()) that you can set using the priority manager. Even if you do not have `chronos` installed all other features will still work!
|
||||
|
||||
@ -45,31 +45,22 @@ end
|
||||
local function getPriority(obj)
|
||||
local avg = average(obj.__profiling)
|
||||
if avg < 0.0002 then
|
||||
multi.print("Setting priority to: core")
|
||||
return PList[1]
|
||||
elseif avg < 0.0004 then
|
||||
multi.print("Setting priority to: very high")
|
||||
return PList[2]
|
||||
elseif avg < 0.0008 then
|
||||
multi.print("Setting priority to: high")
|
||||
return PList[3]
|
||||
elseif avg < 0.001 then
|
||||
multi.print("Setting priority to: above normal")
|
||||
return PList[4]
|
||||
elseif avg < 0.0025 then
|
||||
multi.print("Setting priority to: normal")
|
||||
return PList[5]
|
||||
elseif avg < 0.005 then
|
||||
multi.print("Setting priority to: below normal")
|
||||
return PList[6]
|
||||
elseif avg < 0.008 then
|
||||
multi.print("Setting priority to: low")
|
||||
return PList[7]
|
||||
elseif avg < 0.01 then
|
||||
multi.print("Setting priority to: very low")
|
||||
return PList[8]
|
||||
else
|
||||
multi.print("Setting priority to: idle")
|
||||
return PList[9]
|
||||
end
|
||||
end
|
||||
|
||||
@ -36,6 +36,7 @@ build = {
|
||||
["multi.integration.luvitManager"] = "integration/luvitManager.lua",
|
||||
["multi.integration.threading"] = "integration/threading.lua",
|
||||
["multi.integration.sharedExtensions"] = "integration/sharedExtensions/init.lua",
|
||||
["multi.integration.priorityManager"] = "integration/priorityManager/init.lua",
|
||||
--["multi.integration.networkManager"] = "integration/networkManager.lua",
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user