nim-httpauth icon indicating copy to clipboard operation
nim-httpauth copied to clipboard

Not GC-safe for threading

Open bitnom opened this issue 6 years ago • 0 comments

I managed to get the module working using the fork: https://github.com/travisstaloch/nim-httpauth but I noticed that Jester is only using 1 thread. I tried to compile with --threads:on but I got the error:

/home/user/.nimble/pkgs/jester-0.4.3/jester.nim(1277, 9) Hint: Asynchronous route: match. [User]
/home/user/Projects/project/bin/project.nim(19, 1) template/generic instantiation of `routes` from here
/home/user/.nimble/pkgs/jester-0.4.3/jester.nim(1283, 35) template/generic instantiation of `async` from here
/home/user/.nimble/lib/pure/asyncmacro.nim(272, 31) Error: 'matchIter' is not GC-safe as it accesses 'auth' which is a global using GC'ed memory

This is my first time using Jester. I have read that the best practice is to put it behind nginx or litespeed. Is it also a best practice to enable threads? Seems like it would be.

bitnom avatar Nov 18 '19 22:11 bitnom