Skip to content

Linux: editorhost / runloop.cpp #16

@AZSlow3

Description

@AZSlow3

I am sorry for the tone, but which n00b has written it?
There are all typical errors a person does when creating his first Linux event loop in life...

In RunLoop::select :

  • select(). nfds should be max(fd)+1, not just max(fd)
  • selecting for writeFDs make no sense here and produce busy looping

In RunLoop::start :

  • it make sense first evaluate timeout and then use it then other way around (hoping it will select something the first time, so will be evaluated after)

In TimerProcessor::handleTimersAndReturnNextFireTimeInMs :

  • if (timersToFire.empty ()) should be if(timers.empty()). If we had no ready timers, that does not mean we do not need timers at all.

I know that "lucky bugs combination" make VSTGUI somehow run inside current version. But has no-one notice it consumes 70% (in case of VSTGUI) up to 100% (with other GUI) one core with absolutely idle plug-in?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions