nimassets icon indicating copy to clipboard operation
nimassets copied to clipboard

implementation is not gcsafe

Open mildred opened this issue 2 years ago • 1 comments

Implementation uses a global variable which is not gcsafe, which can be problematic when we want the assets from a gcsafe context (HTTP server callback for example).

Is it safe to use a {.cast(gcsafe)/}: block? The global variable is kind of read-only and permanent to the lifetime of the application. If so, can the generated code provide a gcsafe getAsset?

mildred avatar Apr 12 '23 22:04 mildred

Hi @mildred

I'm not familiar with the {.cast...} pragma , but please if you can help with a contribution i'd be more than willing to get it merged

xmonader avatar Apr 13 '23 00:04 xmonader