aboutsummaryrefslogtreecommitdiff
path: root/python/examples
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2025-05-23 16:48:58 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2025-05-23 16:54:59 +0200
commitc6a77f30f64be73a5e55e06336975f2ecfbb2324 (patch)
tree3c243fbee268b824f18c5dc4d5bff9a9413b9407 /python/examples
parent62d87e063318cc4c842b1b2d8c184f48aeaf6659 (diff)
downloadnissy-core-c6a77f30f64be73a5e55e06336975f2ecfbb2324.tar.gz
nissy-core-c6a77f30f64be73a5e55e06336975f2ecfbb2324.zip
Do all loggin in main thread
Before this committ, the solver (via the generic solution-appender routines in src/solve/solutions.h) and the H48 data generator did some logging in the worker threads, without using any locks. This was not nice, but in practice it did not cause any problem, because the log messages were rare. However, this turned out to be a problem when building to WASM, because web workers do not have access to the main JS memory, and therefore they cannot call functions from the main JS. This includes not only the callback functions for logging, but also those for polling the status of the solver (run / pause / stop). This commit fixes this at the cost or being somewhat inelegant: the solutions are not logged as they are found, but only every 500ms.
Diffstat (limited to 'python/examples')
0 files changed, 0 insertions, 0 deletions

Generated with cgit - Back to sebastiano.tronto.net