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 7 forks source link

emscripten fetch issues #321

Closed ablepharus closed 10 months ago

ablepharus commented 11 months 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