cubicweb #988621 weird json behavior on Windows when running with profile enabled [waiting feedback]

Encountered on customer project: on windows when running with profiling enabled, json requests get garbled (sometimes).

Adim says:

HttpResponse doesn't seem to be finalized correctly.

I supsect a bad interaction between :

  • our resource (CubicWebRootResource) implementation
  • the profiling mode (i.e. returning render_request() directly instead of defering to thread and returning NOT_DONE_YET)
  • the select (win32select) reactor
done in<not specified>
load left1.000
closed by<not specified>