Is https://docs.rs/web-sys/latest/web_sys/struct.DedicatedWorkerGlobalScope.html#method.set_onmessage quite unsafe to use?

Links:

The point here is: to use these set_onmessage functions safely, are we supposed to call .forget() afterwards (or by some other means ensure that the callback stays vaild)?

Why is this not unsafe ?

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.