Jump to content




Multitasking


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

#1 natedogith1

  • Members
  • 110 posts

Posted 01 September 2014 - 03:47 AM

I'm wondering if ComputerCraft actually does multitasking (I know it doesn't on a single CC computer). I feel like I've heard things about, though CC uses threads, it only running one at once. I'm trying to decide whether or not it would be worth it to make a bank of computers to allow executing processes faster (rendering 1300+ points from 3d to 2d (using OpenPeripheral Terminal Glasses) is kinda slow, as is 1900+ for drawing a terminal with Terminal Glasses)

#2 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 01 September 2014 - 04:12 AM

Although it uses threads, it doesn't execute more than one Lua co-routine at a time. While one computer is running code, all other computers are yielding. Therefore, at least within ComputerCraft, clusters are less efficient than single units as parallel processing is impossible.

#3 natedogith1

  • Members
  • 110 posts

Posted 01 September 2014 - 04:44 AM

Well that sucks, makes me wonder how popular servers manage to run CC computers at any decent speed though. (maybe people just aren't doing the ridiculous sort of things I like to do)
Is there any reason it's implemented as such?

Edited by natedogith1, 01 September 2014 - 04:45 AM.


#4 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 01 September 2014 - 04:56 AM

Presumably it's so that ComputerCraft doesn't monopolise MineCraft server power, as it should theoretically put an easily managed cap on CPU usage.

I suspect it doesn't quite work out like that, but generally it should mean that if your world is laggy ComputerCraft isn't the culprit.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users