Re: [Cppcms-users] SSE keep-alive
Brought to you by:
artyom-beilis
|
From: Markus R. <us...@ma...> - 2013-04-04 18:37:31
|
Hello! Artyom Beilis wrote: > I don't really understand why do you have mutex... > > You may not write to the event stream from a thread that is not the event > loop thread. > > If you want to notify the asynchronous SSE on anything you need to use > cppcms::service::post() with a callback that would be executed in the > event loop. It would be a good idea to say that clearly on the very top of http://cppcms.com/cppcms_ref/latest/classcppcms_1_1http_1_1context.html http://cppcms.com/cppcms_ref/latest/classcppcms_1_1http_1_1response.html (it would be the best if you use \warning or \note to make the pitfall more visible) It is otherwise not obvious that this limitation exists. best regards Markus |