Posted 16 June 2014 - 01:49 AM
I was building an aspect refilling for thaumcraft using Thaumic Tinkers CC integration but discovered that the function getAspects() from tilejar peripherals causes the current co-routine to yield. That is a major issue as i'm working inside a semi complex emulator / OS that I made. My thread dispatch correctly catches the coroutine and marks its as "sleeping" but when I try to wake it it just causes errors.
Can anyone think of a way around this with computercraft or should I bring up the issue over on the Thaumic Tinker end?
A bit of test code I wrote to track down the issue to coroutines
Results:
Can anyone think of a way around this with computercraft or should I bring up the issue over on the Thaumic Tinker end?
A bit of test code I wrote to track down the issue to coroutines
names = peripheral.getNames();
for _,v in pairs(names) do
if v:find("tilejar") then
print("herp");
print(peripheral.call(v, "getAspects"));
print("derp");
end
end
function derp()
names = peripheral.getNames();
for _,v in pairs(names) do
if v:find("tilejar") then
print("herp");
print(peripheral.call(v, "getAspects"));
print("derp");
end
end
end
cor = coroutine.create(derp);
print(coroutine.resume(cor));
sleep(1);
print(coroutine.resume(cor));
Results:
herp
Ignis
derp
herp
trueop_tick_sync
falsestartup:18: 1