Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

programs that use the Parallel feature keeps creating more threads and doesn't stop #609

Open
AngryCarrot789 opened this issue Aug 14, 2021 · 3 comments

Comments

@AngryCarrot789
Copy link

fairly certain this is a bug, because a program that uses the Parallel feature sometimes wont do this, but randomly starts doing it. this is what it looks like when you terminate the program:
image

this example it only ran for about 20 minutes
and when terminating that program, the thread usage for the server drops by a bit (i assume for every time it says "parallel:22" thats a thread or coroutine thread being killed)

the program in mind is the bigreactor controller (https://pastebin.com/RCPEHmxs)

@SquidDev
Copy link
Contributor

Self promotion warning, but if you're on 1.12 or later, you may want to switch to CC: Tweaked which at least fixes the thread-usage issue.

The program looks a bit odd in general though, in that homepage calls call_homepage which then calls homepage again - hence the massively nested set of parallel APIs. It's not broken, but (aside from thread usage), does mean the program will get progressively slower the longer it runs.

@AngryCarrot789
Copy link
Author

im still running a server on tekkit (1.6.4) so i can't switch to CC tweake :( unless CC tweaked doesn't have new blocks and stuff, then maybe it could work

i think i might try and modify the that program though and fix that homepage situation, and somehow block users from using that specific pastebin (or try and recompile computercraft to fix the thread issue)

@SquidDev
Copy link
Contributor

SquidDev commented Aug 14, 2021

Ahh, if you're on 1.6.4 then I'm afraid you're probably out of luck. We only have source code available for the 1.8.9 versions (and later), so recompiling isn't an option either.

You could probably write a core mod to replace the Lua runtime, but I don't think it's really worth it. Providing an alternative big-reactor program and blocking people from using that one (I'd just run a grep on the computer directory for "by jaranvil aka jared314" or something) is probably your best bet :/.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants