jester icon indicating copy to clipboard operation
jester copied to clipboard

route init callback support?

Open sclee15 opened this issue 6 years ago • 2 comments

it seems like Jester can be run on multiple threads. I miss some sort of a callback function that is called when the new thread spawned is there such callback?

thank you.

sclee15 avatar Jan 18 '19 23:01 sclee15

There isn't AFAIK, unless Nim provides that somehow. The best you can do is what I suggested on irc.

Perhaps there is a different reason you want this callback?

dom96 avatar Jan 19 '19 02:01 dom96

I don't prefer check whether the thread var is initialized for every web request. I want to trust the thread var is initialized. for that maybe there is on_init callback for routes so that i can init the thread var once per every thread.

sclee15 avatar Jan 19 '19 02:01 sclee15