1
0
mirror of https://github.com/LDDestroier/CC/ synced 2025-08-30 17:38:00 +00:00

Added 'useSleepToYield'

This commit is contained in:
LDDestroier
2019-05-09 01:56:23 -04:00
committed by GitHub
parent ff9afd4ac8
commit 498891c101

View File

@@ -4,6 +4,7 @@ local tArg = {...}
disknet.mainPath = tArg[1] or "disk/DISKNET"
local limitChannelsToModem = false
local useSleepToYield = false
local maximumBufferSize = 64
local openChannels = {}
@@ -218,8 +219,12 @@ disknet.receive = function(channel, senderFilter)
if output then
break
else
os.queueEvent("")
os.pullEvent("")
if useSleepToYield then
sleep(0)
else
os.queueEvent("")
os.pullEvent("")
end
end
for i = 1, #fList do
fList[i].close()