Jump to content




coroutine.status problem


  • You cannot reply to this topic
3 replies to this topic

#1 Hiran

  • Members
  • 44 posts

Posted 06 October 2014 - 07:42 PM

Im fighting with multishell and something unexpected is happening. Im checking my only coroutine created with multishell "launchProcess"
local cor = tProcess.co
print (cor)
print (coroutine.status(cor))
first print shows "thread:" and HEX code of this coroutine, but second shows "dead". Its my only coroutine so its a bit weird, as "dead" should be shown only if that coroutine ended, either with or without error. Can someone explain why is this happening and how to fix this?

http://pastebin.com/TYQmDvHK

Here you have full multishell, but this file is heavy under construction, so many things will change within it.

#2 MKlegoman357

  • Members
  • 1,170 posts
  • LocationKaunas, Lithuania

Posted 07 October 2014 - 01:00 PM

'launchProcess' runs the coroutine at the end of it using the 'resumeProcess' function so that might be your problem. What function/program does that coroutine run?

EDIT: Also, where are you putting your code (the one in the OP)?

Edited by MKlegoman357, 07 October 2014 - 01:01 PM.


#3 Hiran

  • Members
  • 44 posts

Posted 07 October 2014 - 02:59 PM

These 3 lines were in the cullProcess function. I created function that's called manually and it still shows that all the coroutines are "dead".
function multishell.printStatus(ID)
   print (coroutine.status(tProcesses[ID].co))
end
When i enter tab with coroutine that "ended" it shows error, so everything as expected. But most recent version of my multishell is created in a way that doesnt allow to end multishell tab with id 1, but when i call function printStatus it shows "dead"

#4 Hiran

  • Members
  • 44 posts

Posted 07 October 2014 - 07:22 PM

Problem solved
I used this:
http://www.computerc...utine-override/
to override bios, but for some odd reason reverting back coroutine.status didn't work when i used os.run() to launch my multishell. when i pasted everything into one file it works :huh: .
And now the question - why did second rawset didnt work when i used os.run() to launch my version of multishell?





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users