Skip to content

[0.17-beta] When compiled to exe: Random errors occur sometimes when sparkles subprocesses are started too fast after each other. (For multithreading) #4

@LtqxWYEG

Description

@LtqxWYEG

My multithreading solution causes n subprocesses of sparkles to spawn. This happens too fast when it's all compiled to a executable; Random errors occur that are seemingly related to how much time the program had to run through before the next subprocess was started.

I had to add a 1.5 second delay between launches of the sparkles subprocesses. This is annoying, but barely noticable when there are only 2 - which is the best anyway for up to a medium amount of particles.
So this seems to be a sufficient work-around until I figure out what really the problem is. It's never what I think it is.

if isCompiledToExe:
    returnValue = Popen("sparkles.exe", shell=False, creationflags=CREATE_NO_WINDOW, cwd=getcwd())
    proc.append(returnValue)
    if numberTasks > 1:
        sleep(1.5)  # random errors occur when running multiple exe at the same time. Sleep does help

Any Ideas?

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions