]> matita.cs.unibo.it Git - helm.git/commit
Worker thread killing fixed
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Fri, 30 Dec 2022 21:27:33 +0000 (22:27 +0100)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Fri, 30 Dec 2022 21:27:33 +0000 (22:27 +0100)
commitd7aca3eacb4bd8dc56223098f92e5370c82f92ff
tree5ebb91c2b0d6cee24b6406d739931075bc8a639f
parent9d3f004fe43b3c0df85f1ca27662538e4686c0f4
Worker thread killing fixed

In old Ocaml it used to work catching a Unix signal that was raised at the
end of each timeslice. It works no more in Ocaml5.

- we now use a fixed timer (every 1s) to trigger the Unix signal
- the signal is usually caught by the non-worker thread and for some reason
  blocking the signal interferes with Gtk
- solution: if the signal is caught by the non-worker thread, the thread
  goes to sleep for 3s to let the worker thread catch the signal

Most of the time the trick works, even if some delay is introdued.
matita/matita/matitaGui.ml