keiranking / Phil

A crossword maker.
http://www.keiranking.com/phil
Apache License 2.0
282 stars 85 forks source link

Async quickFill using wasm-based SAT solver #6

Closed raphlinus closed 6 years ago

raphlinus commented 6 years ago

The first of the two commits gets to a working version that has stability problems on Chrome (due to crbug 775952) because of leaks when terminating workers, but is a very clean patch to glucose.

The second commit moves to a model where there is a single worker that handles all requests, including requests to cancel the current problem. It uses the asyncify feature of emscripten to return control periodically to the JavaScript main loop so that it has the opportunity to receive the cancel request.