fair-acc / opencmw-cpp

Open Common Middle-Ware library for accelerator equipment- and beam-based control systems at FAIR.
https://opencmw.io
GNU Lesser General Public License v3.0
10 stars 8 forks source link

emscripten fetch issues #321

Closed ablepharus closed 1 year ago

ablepharus commented 1 year ago

when using RestClientEmscripten, and especially ContextClient with a Rest client, we stumble into a couple of problems.

emscripten_fetch is an asynchronous function

proxying fetch calls to the main thread will require storing callbacks.

with threading, dangling threads tend to happen, also there is some buggy behaviour on exit, when deserialise gets called inside the callback. this might be related to a static variable in IoBuffer or a (missing) inline.

https://github.com/emscripten-core/emscripten/issues/16305