#20238: StoppableWSGIServer is not multithread support
-----------------------------------+--------------------------------------
Reporter: jwxiao@… | Owner: nobody
Type: Bug | Status: new
Component: Testing framework | Version: 1.4
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------------------------
Changes (by Aymeric Augustin):
* status: closed => new
* resolution: wontfix =>
Comment:
I'm hitting this problem, which means I have a concrete use case to offer.
I have a view that generates a PDF document by converting a HTML document
served by the same server (with phantomjs). It works as follows:
- user makes a HTTP request for a PDF document
- pdf_view() starts a phantomjs subprocess
- phantomjs makes a HTTP request for the equivalent HTML document
- html_view() renders a HTML template
- phantomjs gets the HTML, converts it to PDF, and returns that
- pdf_view() returns the PDF
I cannot use that view with the LiveServerTestCase because it's single
threaded. The thread runs pdf_view(), waits for phantomjs, but there's no
thread available to run html_view(), so the test blocks there.
--
Ticket URL: <https://code.djangoproject.com/ticket/20238#comment:6>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/074.01624494619fac132164547a2351c030%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.