Skip to content

service-fn blocks main thread even when running inside another thread #270

Answered by J0sueTM
J0sueTM asked this question in Q&A
Discussion options

You must be logged in to vote

@avelino After fiddling around with service-fn, I discovered that we actually don't need to create a webserver in order to use moclojer. All we need to do is "start" it as a pedestal interceptor:

(-> (helpers/service-fn
     "test/com/moclojer/resources/moclojer-v2.yaml"
     {:start? false :join? false})
    (response-for :get "/users/avelino/2222")
    ...

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@J0sueTM
Comment options

J0sueTM Aug 20, 2024
Collaborator Author

@avelino
Comment options

@J0sueTM
Comment options

J0sueTM Aug 20, 2024
Collaborator Author

@J0sueTM
Comment options

J0sueTM Aug 20, 2024
Collaborator Author

Answer selected by J0sueTM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
:question Further information is requested
2 participants