You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I know that essentially all computers run inside their own coroutine and are killed if they don't yield for 7 seconds.
I was always under the impression that on server shutdown computercraft would continue to run until control is yielded back to the main program in control (hope that makes sense). So for a maximum of 7 seconds worst-case. However I recently noticed using the computercraft track command (really awesome stuff btw!) that my program that I have programmed to always run for about 200ms before yielding (in order to not obstruct other turtle's movement which takes 400ms and should always get priority thanks to the scheduler) actually only ran a little over a millisecond at a time.
I concluded that CC:Tweaked must have a way to interrupt and resume programs actively (other than them yielding) which I guess is pretty cool. But do programs still have the same guarantee that they will only shut down after they have yielded in case of a (planned) server shutdown? Because if not, that would make any self-persisted programs virtually impossible.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
So I know that essentially all computers run inside their own coroutine and are killed if they don't yield for 7 seconds.
I was always under the impression that on server shutdown computercraft would continue to run until control is yielded back to the main program in control (hope that makes sense). So for a maximum of 7 seconds worst-case. However I recently noticed using the computercraft track command (really awesome stuff btw!) that my program that I have programmed to always run for about 200ms before yielding (in order to not obstruct other turtle's movement which takes 400ms and should always get priority thanks to the scheduler) actually only ran a little over a millisecond at a time.
I concluded that CC:Tweaked must have a way to interrupt and resume programs actively (other than them yielding) which I guess is pretty cool. But do programs still have the same guarantee that they will only shut down after they have yielded in case of a (planned) server shutdown? Because if not, that would make any self-persisted programs virtually impossible.
Beta Was this translation helpful? Give feedback.
All reactions