user202729 / CasioEmu

An emulator for nX-U8 based Casio fx-es PLUS calculators
GNU General Public License v3.0
57 stars 12 forks source link

Thread starvation when computer is too slow #1

Open user202729 opened 5 years ago

user202729 commented 5 years ago

With the timer fix (https://github.com/user202729/CasioEmu/commit/cc8a196eed318636db3ab2043879743120eb172c) It's possible that there's no wait between two timer call back, so the main thread may takes an arbitrary long time to acquire the lock.

Possible solution: https://stackoverflow.com/q/11666610

As a work around it's possible to reduce the cycle per second value. Usually it isn't a problem when -O2 is enabled in the Makefile.