cppcms-users Mailing List for CppCMS C++ Web Framework (Page 38)
Brought to you by:
artyom-beilis
You can subscribe to this list here.
| 2009 |
Jan
|
Feb
(22) |
Mar
|
Apr
(3) |
May
|
Jun
(4) |
Jul
|
Aug
|
Sep
|
Oct
(15) |
Nov
(16) |
Dec
(13) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2010 |
Jan
(4) |
Feb
|
Mar
(8) |
Apr
(8) |
May
(8) |
Jun
(36) |
Jul
(63) |
Aug
(126) |
Sep
(47) |
Oct
(66) |
Nov
(46) |
Dec
(42) |
| 2011 |
Jan
(87) |
Feb
(24) |
Mar
(54) |
Apr
(21) |
May
(22) |
Jun
(18) |
Jul
(22) |
Aug
(101) |
Sep
(57) |
Oct
(33) |
Nov
(34) |
Dec
(66) |
| 2012 |
Jan
(64) |
Feb
(76) |
Mar
(73) |
Apr
(105) |
May
(93) |
Jun
(83) |
Jul
(84) |
Aug
(88) |
Sep
(57) |
Oct
(59) |
Nov
(35) |
Dec
(49) |
| 2013 |
Jan
(67) |
Feb
(17) |
Mar
(49) |
Apr
(64) |
May
(87) |
Jun
(64) |
Jul
(93) |
Aug
(23) |
Sep
(15) |
Oct
(16) |
Nov
(62) |
Dec
(73) |
| 2014 |
Jan
(5) |
Feb
(23) |
Mar
(21) |
Apr
(11) |
May
(1) |
Jun
(19) |
Jul
(27) |
Aug
(16) |
Sep
(5) |
Oct
(37) |
Nov
(12) |
Dec
(9) |
| 2015 |
Jan
(7) |
Feb
(7) |
Mar
(44) |
Apr
(28) |
May
(5) |
Jun
(12) |
Jul
(8) |
Aug
|
Sep
(39) |
Oct
(34) |
Nov
(30) |
Dec
(34) |
| 2016 |
Jan
(66) |
Feb
(23) |
Mar
(33) |
Apr
(15) |
May
(11) |
Jun
(15) |
Jul
(26) |
Aug
(4) |
Sep
(1) |
Oct
(30) |
Nov
(10) |
Dec
|
| 2017 |
Jan
(52) |
Feb
(9) |
Mar
(24) |
Apr
(16) |
May
(9) |
Jun
(12) |
Jul
(33) |
Aug
(8) |
Sep
|
Oct
(1) |
Nov
(2) |
Dec
(6) |
| 2018 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
(14) |
Jun
(1) |
Jul
(9) |
Aug
(1) |
Sep
(13) |
Oct
(8) |
Nov
(2) |
Dec
(2) |
| 2019 |
Jan
(1) |
Feb
(1) |
Mar
(3) |
Apr
(3) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
(9) |
Jul
(6) |
Aug
(25) |
Sep
(10) |
Oct
(10) |
Nov
(6) |
Dec
|
| 2021 |
Jan
|
Feb
|
Mar
(7) |
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(9) |
Oct
(1) |
Nov
|
Dec
|
| 2022 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2025 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
|
From: giovani m. <gio...@ho...> - 2014-06-04 11:15:21
|
Thank you guys, that did the trick =). > From: sta...@zo... > Date: Wed, 4 Jun 2014 09:38:51 +0300 > To: cpp...@li... > Subject: Re: [Cppcms-users] Make application externally available > > Ops, now you have all my contacts also in the signature. It was my > mistake, but I hope you will use them wisely :) > > > On Wed, Jun 4, 2014 at 9:35 AM, Stanimir Mladenov > <sta...@zo...> wrote: > > You can read more for the configuration here > > http://cppcms.com/wikipp/en/page/cppcms_1x_config#service > > > > Your config.js should look something like this: > > > > { > > "service": { > > "list": [ > > {"ip": "127.0.0.1", "api": "http", "port": 8080}, > > {"ip": "192.168.0.104", "api": "http", "port": 8080}, > > ] > > }, > > "http": { > > "script_names": ["/app.fcgi"] > > }, > > "file_server" : { > > "enable": true, > > } > > } > > > > > > > > On Wed, Jun 4, 2014 at 6:46 AM, giovani milanez > > <gio...@ho...> wrote: > >> Hello, > >> how can i make my application externally available? > >> > >> For example, i can only access my app from http://localhost:8080/app > >> But others computer from my local network can't access > >> http://192.168.0.104:8080/app > >> > >> In apache we can do it by changing the httpd.conf file to something like > >> 'Listen *:8080' > >> But Im not using apache. I want to do it with the cppcms embedded web > >> server. > >> > >> Thanks. > >> > >> > >> > >> ------------------------------------------------------------------------------ > >> Learn Graph Databases - Download FREE O'Reilly Book > >> "Graph Databases" is the definitive new guide to graph databases and their > >> applications. Written by three acclaimed leaders in the field, > >> this first edition is now available. Download your free book today! > >> http://p.sf.net/sfu/NeoTech > >> _______________________________________________ > >> Cppcms-users mailing list > >> Cpp...@li... > >> https://lists.sourceforge.net/lists/listinfo/cppcms-users > >> > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/NeoTech > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users |
|
From: Artyom B. <art...@ya...> - 2014-06-04 07:35:11
|
or just set service.ip to 0.0.0.0 - i.e. any address Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ -------------------------------------------- On Wed, 6/4/14, Stanimir Mladenov <sta...@zo...> wrote: Subject: Re: [Cppcms-users] Make application externally available To: "CppCMS users group" <cpp...@li...> Date: Wednesday, June 4, 2014, 9:35 AM You can read more for the configuration here http://cppcms.com/wikipp/en/page/cppcms_1x_config#service Your config.js should look something like this: { "service": { "list": [ {"ip": "127.0.0.1", "api": "http", "port": 8080}, {"ip": "192.168.0.104", "api": "http", "port": 8080}, ] }, "http": { "script_names": ["/app.fcgi"] }, "file_server" : { "enable": true, } } Поздрави, Станимир Младенов Зоун Проджектс ООД Моб: +359 888 278962 Тел: +359 2 9297595 sta...@zo... www.zoneprojects.com On Wed, Jun 4, 2014 at 6:46 AM, giovani milanez <gio...@ho...> wrote: > Hello, > how can i make my application externally available? > > For example, i can only access my app from http://localhost:8080/app > But others computer from my local network can't access > http://192.168.0.104:8080/app > > In apache we can do it by changing the httpd.conf file to something like > 'Listen *:8080' > But Im not using apache. I want to do it with the cppcms embedded web > server. > > Thanks. > > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/NeoTech > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/NeoTech _______________________________________________ Cppcms-users mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppcms-users |
|
From: Stanimir M. <sta...@zo...> - 2014-06-04 07:08:49
|
Ops, now you have all my contacts also in the signature. It was my mistake, but I hope you will use them wisely :) On Wed, Jun 4, 2014 at 9:35 AM, Stanimir Mladenov <sta...@zo...> wrote: > You can read more for the configuration here > http://cppcms.com/wikipp/en/page/cppcms_1x_config#service > > Your config.js should look something like this: > > { > "service": { > "list": [ > {"ip": "127.0.0.1", "api": "http", "port": 8080}, > {"ip": "192.168.0.104", "api": "http", "port": 8080}, > ] > }, > "http": { > "script_names": ["/app.fcgi"] > }, > "file_server" : { > "enable": true, > } > } > > > > On Wed, Jun 4, 2014 at 6:46 AM, giovani milanez > <gio...@ho...> wrote: >> Hello, >> how can i make my application externally available? >> >> For example, i can only access my app from http://localhost:8080/app >> But others computer from my local network can't access >> http://192.168.0.104:8080/app >> >> In apache we can do it by changing the httpd.conf file to something like >> 'Listen *:8080' >> But Im not using apache. I want to do it with the cppcms embedded web >> server. >> >> Thanks. >> >> >> >> ------------------------------------------------------------------------------ >> Learn Graph Databases - Download FREE O'Reilly Book >> "Graph Databases" is the definitive new guide to graph databases and their >> applications. Written by three acclaimed leaders in the field, >> this first edition is now available. Download your free book today! >> http://p.sf.net/sfu/NeoTech >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> |
|
From: Stanimir M. <sta...@zo...> - 2014-06-04 06:58:53
|
You can read more for the configuration here http://cppcms.com/wikipp/en/page/cppcms_1x_config#service Your config.js should look something like this: { "service": { "list": [ {"ip": "127.0.0.1", "api": "http", "port": 8080}, {"ip": "192.168.0.104", "api": "http", "port": 8080}, ] }, "http": { "script_names": ["/app.fcgi"] }, "file_server" : { "enable": true, } } Поздрави, Станимир Младенов Зоун Проджектс ООД Моб: +359 888 278962 Тел: +359 2 9297595 sta...@zo... www.zoneprojects.com On Wed, Jun 4, 2014 at 6:46 AM, giovani milanez <gio...@ho...> wrote: > Hello, > how can i make my application externally available? > > For example, i can only access my app from http://localhost:8080/app > But others computer from my local network can't access > http://192.168.0.104:8080/app > > In apache we can do it by changing the httpd.conf file to something like > 'Listen *:8080' > But Im not using apache. I want to do it with the cppcms embedded web > server. > > Thanks. > > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/NeoTech > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
|
From: Artyom B. <art...@ya...> - 2014-06-04 06:14:11
|
http://cppcms.com/wikipp/en/page/cppcms_1x_config#service.ip Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ -------------------------------------------- On Wed, 6/4/14, giovani milanez <gio...@ho...> wrote: Subject: [Cppcms-users] Make application externally available To: "cpp...@li..." <cpp...@li...> Date: Wednesday, June 4, 2014, 6:46 AM Hello, how can i make my application externally available? For example, i can only access my app from http://localhost:8080/appBut others computer from my local network can't access http://192.168.0.104:8080/app In apache we can do it by changing the httpd.conf file to something like 'Listen *:8080'But Im not using apache. I want to do it with the cppcms embedded web server. Thanks. -----Inline Attachment Follows----- ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/NeoTech -----Inline Attachment Follows----- _______________________________________________ Cppcms-users mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppcms-users |
|
From: giovani m. <gio...@ho...> - 2014-06-04 03:46:44
|
Hello, how can i make my application externally available? For example, i can only access my app from http://localhost:8080/appBut others computer from my local network can't access http://192.168.0.104:8080/app In apache we can do it by changing the httpd.conf file to something like 'Listen *:8080'But Im not using apache. I want to do it with the cppcms embedded web server. Thanks. |
|
From: Sergey <ser...@gm...> - 2014-05-02 07:05:58
|
Hi Artyom. What means this error? I have this on picase.net 2014-05-01 19:09:36; cppcms, warning: Failed to write response:system: Broken pipe (http_response.cpp:80) 2014-05-01 19:27:40; cppcms, warning: Failed to write response:system: Broken pipe (http_response.cpp:80) 2014-05-01 19:46:19; cppcms, warning: Failed to write response:system: Broken pipe (http_response.cpp:80) 2014-05-01 19:52:38; cppcms, warning: Failed to write response:system: Broken pipe (http_response.cpp:80) 2014-05-01 19:52:54; cppcms, warning: Failed to write response:system: Broken pipe (http_response.cpp:80) 2014-05-01 20:07:56; cppcms, warning: Failed to write response:system: Broken pipe (http_response.cpp:80) 2014-05-01 20:11:19; cppcms, warning: Failed to write response:system: Broken pipe (http_response.cpp:80) 2014-05-01 20:33:40; cppcms, warning: Failed to write response:system: Broken pipe (http_response.cpp:80) 2014-05-01 20:46:06; cppcms, warning: Failed to write response:system: Broken pipe (http_response.cpp:80) 2014-05-01 22:06:37; cppcms, warning: Failed to write response:system: Broken pipe (http_response.cpp:80) 2014-05-01 22:20:48; cppcms, warning: Failed to write response:system: Broken pipe (http_response.cpp:80) 2014-05-01 22:30:47; cppcms, warning: Failed to write response:system: Broken pipe (http_response.cpp:80) 2014-05-01 22:40:45; cppcms, warning: Failed to write response:system: Broken pipe (http_response.cpp:80) 2014-05-01 23:39:48; cppcms, warning: Failed to write response:system: Broken pipe (http_response.cpp:80) 2014-05-02 01:39:52; cppcms, warning: Failed to write response:system: Broken pipe (http_response.cpp:80) |
|
From: Christian G. <chr...@gm...> - 2014-04-30 08:18:54
|
Hi 2014-04-29 19:02 GMT+02:00 Eric Gendron <con...@gm...>: > hi, > what is the best way to authenticate with restfull services crafted in > cppcms framework? > make use of oauth2. greets -- Christian Gmeiner, MSc https://soundcloud.com/christian-gmeiner |
|
From: Eric G. <con...@gm...> - 2014-04-29 17:02:56
|
hi, what is the best way to authenticate with restfull services crafted in cppcms framework? thanks |
|
From: Joerg S. <jo...@br...> - 2014-04-16 13:34:46
|
On Wed, Apr 16, 2014 at 03:34:17AM -0700, Artyom Beilis wrote:
> AFAIR when I tested it I found that it was false positive alarm.
Looking at it in more details, I see the issue. Run with
--malloc-fill=0x77. Trying to dereference end in
booster::aio::io_service::set_timer_event now shows after the necessary
cast:
(gdb) print ((std::_Rb_tree_iterator<std::pair<booster::ptime const,
booster::aio::event_loop_impl::timer_event> > *)0x9fa1290)[0]
$14 = {_M_node = 0x7777777700000000}
This looks completely valid, especially since the modifications to
timer_events_ itself will invalidate the iterator...
Joerg
|
|
From: Lederhilger M. <M.L...@ds...> - 2014-04-16 12:20:24
|
Am 2014-04-16 14:01, schrieb Martin Lederhilger: > Hello, > > I have a few questions regarding the purpose of session. First of all I > understand it's main purpose, which is distinguishing connections from > different users (= sessions). But apart from that, is it only used to > store some global and not often changing information like user id, csrf > token and alike, which is useful for all applications in an application > hierarchy? I would need to store some state per application in the An example of such a state in the application would be to collect some parameters on three different wizard pages, and to only apply them (eg. persist them in a configuration file) when the users finishes filling out the last page. > hierarchy per session. I think it is not good to store that in the > session itself - need for serialization / deserialization, changes to > the session can be lost if requests from the same session are handled in > parallel (if a second request which is changing the session is handled > in the time between load and save of the session of the first request). > Is it better to store the application state elsewhere? Is it possible to > get notified, if CppCMS garbage collects sessions, so that the > additional application state can be cleaned up too? > > Thank you for your answers, > > Martin Lederhilger > |
|
From: Lederhilger M. <M.L...@ds...> - 2014-04-16 12:13:58
|
Hello, I have a few questions regarding the purpose of session. First of all I understand it's main purpose, which is distinguishing connections from different users (= sessions). But apart from that, is it only used to store some global and not often changing information like user id, csrf token and alike, which is useful for all applications in an application hierarchy? I would need to store some state per application in the hierarchy per session. I think it is not good to store that in the session itself - need for serialization / deserialization, changes to the session can be lost if requests from the same session are handled in parallel (if a second request which is changing the session is handled in the time between load and save of the session of the first request). Is it better to store the application state elsewhere? Is it possible to get notified, if CppCMS garbage collects sessions, so that the additional application state can be cleaned up too? Thank you for your answers, Martin Lederhilger |
|
From: 胡文志 <rus...@16...> - 2014-04-16 10:51:33
|
thanks! i fixed it use gcc of mac system ,5.1. 2014年4月16日 下午6:42于 Artyom Beilis <art...@ya...>写道: > > You probably need to check - try to get a backtrace or something like that of some simplest test > like > > under build/booster > run ./test_locale_config that runs directly. > > I assume that there is some setup problem, some ABI or library mistmatch - make sure that gcc and the libstdc++ > that the program uses are of the same origin. > > In any case it looks like a setup problem. > > Artyom Beilis > -------------- > CppCMS - C++ Web Framework: http://cppcms.com/ > CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ > > -------------------------------------------- > On Tue, 4/15/14, HuWenzhi <rus...@16...> wrote: > > Subject: [Cppcms-users] [bug report]Test errors at Mac 10.9.3 x64 > To: cpp...@li... > Date: Tuesday, April 15, 2014, 1:25 PM > > Mac > 10.9.3 x64 / Darwin Kernel Version 13.1.0SVN > revision 2244Python 2.7.5cmake version > 2.8.12.2PCRE version 8.34 2013-12-15gcc > (GCC) 4.7.3icu4c/52.1 > > i use: > cmake > -DCMAKE_C_COMPILER=/usr/local/bin/x86_64-apple-darwin13.1.0-gcc-4.7.3 -DCMAKE_CXX_COMPILER=/usr/local/bin/x86_64-apple-darwin13.1.0-g++-4.7 > -DCMAKE_LIBRARY_PATH=/usr/local/Cellar/boost/1.55.0_1/lib > -DCMAKE_INCLUDE_PATH=/usr/local/Cellar/boost/1.55.0_1/include > -DDISABLE_ICONV=ON ..makemake > installmake test > > so…——————————44% > tests passed, 54 tests failed out of 97 > > Total Test time (real) = 48.55 sec > > The following tests FAILED: > 17 - tc_test_shared > (SEGFAULT) > 18 - tc_test_separate > (SEGFAULT) > 19 - status_test > (SEGFAULT) > 20 - > async_status_test (SEGFAULT) > 21 - form_test > (SEGFAULT) > 22 - cookie_test > (SEGFAULT) > 23 - > internal_forwarder_test (SEGFAULT) > 24 - forwarder_test > (SEGFAULT) > 25 - jsonrpc_test > (SEGFAULT) > 26 - > http_timeouts_test_read (SEGFAULT) > 27 - > http_timeouts_test_write (SEGFAULT) > 28 - file_server_test > (SEGFAULT) > 29 - > file_server_with_listing_test (SEGFAULT) > 30 - disco_test_http > (SEGFAULT) > 31 - > disco_test_fastcgi_tcp (SEGFAULT) > 32 - > disco_test_scgi_tcp (SEGFAULT) > 33 - secure_post_test > (SEGFAULT) > 34 - > disco_test_fastcgi_unix (SEGFAULT) > 35 - > disco_test_scgi_unix (SEGFAULT) > 36 - gzip_test > (SEGFAULT) > 37 - > cache_frontend_test (SEGFAULT) > 38 - > cppcms_service_test (Failed) > 39 - > session_interface_test_client_renew (SEGFAULT) > 40 - > session_interface_test_client_browser (SEGFAULT) > 41 - > session_interface_test_client_fixed (SEGFAULT) > 42 - > session_interface_test_server_renew (SEGFAULT) > 43 - > session_interface_test_server_browser (SEGFAULT) > 44 - > session_interface_test_server_fixed (SEGFAULT) > 45 - > session_interface_test_both_renew (SEGFAULT) > 46 - > session_interface_test_both_browser (SEGFAULT) > 47 - > session_interface_test_both_fixed (SEGFAULT) > 48 - > proto_test_async_http (SEGFAULT) > 49 - > proto_test_async_scgi (SEGFAULT) > 50 - > proto_test_async_fastcgi (SEGFAULT) > 51 - > proto_test_async_scgi_unix (SEGFAULT) > 52 - > proto_test_async_fastcgi_unix (SEGFAULT) > 53 - > proto_test_sync_http (SEGFAULT) > 54 - > proto_test_sync_scgi (SEGFAULT) > 55 - > proto_test_sync_fastcgi (SEGFAULT) > 56 - > proto_test_sync_scgi_unix (SEGFAULT) > 57 - > proto_test_sync_fastcgi_unix (SEGFAULT) > 58 - > loadable_storage_pass (SEGFAULT) > 59 - > loadable_storage_fail (SEGFAULT) > 75 - test_aio_socket > (Failed) > 79 - > test_locale_codepage (SEGFAULT) > 80 - > test_locale_message (SEGFAULT) > 83 - > test_locale_date_time (SEGFAULT) > 84 - > test_locale_generator (SEGFAULT) > 85 - > test_locale_config (SEGFAULT) > 87 - > test_locale_collate (SEGFAULT) > 88 - > test_locale_convert (SEGFAULT) > 89 - > test_locale_boundary (SEGFAULT) > 90 - > test_locale_formatting (SEGFAULT) > 91 - > test_locale_icu_vs_os_timezone (SEGFAULT) > Errors while running CTest > make: *** [test] Error > 8—————————— > make hello_world: > make > CXX=/usr/local/bin/x86_64-apple-darwin13.1.0-g++-4.7 ./hello > -c config.js > then…Segmentation fault: > 11 > > > what’s wrong ? > thanks. > -----Inline Attachment Follows----- > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph > databases and their > applications. Written by three acclaimed leaders in the > field, > this first edition is now available. Download your free book > today! > http://p.sf.net/sfu/NeoTech > -----Inline Attachment Follows----- > > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/NeoTech > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users |
|
From: Artyom B. <art...@ya...> - 2014-04-16 10:42:24
|
You probably need to check - try to get a backtrace or something like that of some simplest test like under build/booster run ./test_locale_config that runs directly. I assume that there is some setup problem, some ABI or library mistmatch - make sure that gcc and the libstdc++ that the program uses are of the same origin. In any case it looks like a setup problem. Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ -------------------------------------------- On Tue, 4/15/14, HuWenzhi <rus...@16...> wrote: Subject: [Cppcms-users] [bug report]Test errors at Mac 10.9.3 x64 To: cpp...@li... Date: Tuesday, April 15, 2014, 1:25 PM Mac 10.9.3 x64 / Darwin Kernel Version 13.1.0SVN revision 2244Python 2.7.5cmake version 2.8.12.2PCRE version 8.34 2013-12-15gcc (GCC) 4.7.3icu4c/52.1 i use: cmake -DCMAKE_C_COMPILER=/usr/local/bin/x86_64-apple-darwin13.1.0-gcc-4.7.3 -DCMAKE_CXX_COMPILER=/usr/local/bin/x86_64-apple-darwin13.1.0-g++-4.7 -DCMAKE_LIBRARY_PATH=/usr/local/Cellar/boost/1.55.0_1/lib -DCMAKE_INCLUDE_PATH=/usr/local/Cellar/boost/1.55.0_1/include -DDISABLE_ICONV=ON ..makemake installmake test so…——————————44% tests passed, 54 tests failed out of 97 Total Test time (real) = 48.55 sec The following tests FAILED: 17 - tc_test_shared (SEGFAULT) 18 - tc_test_separate (SEGFAULT) 19 - status_test (SEGFAULT) 20 - async_status_test (SEGFAULT) 21 - form_test (SEGFAULT) 22 - cookie_test (SEGFAULT) 23 - internal_forwarder_test (SEGFAULT) 24 - forwarder_test (SEGFAULT) 25 - jsonrpc_test (SEGFAULT) 26 - http_timeouts_test_read (SEGFAULT) 27 - http_timeouts_test_write (SEGFAULT) 28 - file_server_test (SEGFAULT) 29 - file_server_with_listing_test (SEGFAULT) 30 - disco_test_http (SEGFAULT) 31 - disco_test_fastcgi_tcp (SEGFAULT) 32 - disco_test_scgi_tcp (SEGFAULT) 33 - secure_post_test (SEGFAULT) 34 - disco_test_fastcgi_unix (SEGFAULT) 35 - disco_test_scgi_unix (SEGFAULT) 36 - gzip_test (SEGFAULT) 37 - cache_frontend_test (SEGFAULT) 38 - cppcms_service_test (Failed) 39 - session_interface_test_client_renew (SEGFAULT) 40 - session_interface_test_client_browser (SEGFAULT) 41 - session_interface_test_client_fixed (SEGFAULT) 42 - session_interface_test_server_renew (SEGFAULT) 43 - session_interface_test_server_browser (SEGFAULT) 44 - session_interface_test_server_fixed (SEGFAULT) 45 - session_interface_test_both_renew (SEGFAULT) 46 - session_interface_test_both_browser (SEGFAULT) 47 - session_interface_test_both_fixed (SEGFAULT) 48 - proto_test_async_http (SEGFAULT) 49 - proto_test_async_scgi (SEGFAULT) 50 - proto_test_async_fastcgi (SEGFAULT) 51 - proto_test_async_scgi_unix (SEGFAULT) 52 - proto_test_async_fastcgi_unix (SEGFAULT) 53 - proto_test_sync_http (SEGFAULT) 54 - proto_test_sync_scgi (SEGFAULT) 55 - proto_test_sync_fastcgi (SEGFAULT) 56 - proto_test_sync_scgi_unix (SEGFAULT) 57 - proto_test_sync_fastcgi_unix (SEGFAULT) 58 - loadable_storage_pass (SEGFAULT) 59 - loadable_storage_fail (SEGFAULT) 75 - test_aio_socket (Failed) 79 - test_locale_codepage (SEGFAULT) 80 - test_locale_message (SEGFAULT) 83 - test_locale_date_time (SEGFAULT) 84 - test_locale_generator (SEGFAULT) 85 - test_locale_config (SEGFAULT) 87 - test_locale_collate (SEGFAULT) 88 - test_locale_convert (SEGFAULT) 89 - test_locale_boundary (SEGFAULT) 90 - test_locale_formatting (SEGFAULT) 91 - test_locale_icu_vs_os_timezone (SEGFAULT) Errors while running CTest make: *** [test] Error 8—————————— make hello_world: make CXX=/usr/local/bin/x86_64-apple-darwin13.1.0-g++-4.7 ./hello -c config.js then…Segmentation fault: 11 what’s wrong ? thanks. -----Inline Attachment Follows----- ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/NeoTech -----Inline Attachment Follows----- _______________________________________________ Cppcms-users mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppcms-users |
|
From: Artyom B. <art...@ya...> - 2014-04-16 10:35:24
|
AFAIR when I tested it I found that it was false positive alarm. Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ -------------------------------------------- On Fri, 4/11/14, Joerg Sonnenberger <jo...@br...> wrote: Subject: [Cppcms-users] valgrind and cppcms To: cpp...@li... Date: Friday, April 11, 2014, 3:41 AM Hello Artyom, can you run cppcms under valgrind? During startup I see the following: ==28026== Use of uninitialised value of size 8 ==28026== at 0x525BF54: booster::aio::io_service::set_timer_event(booster::ptime const&, booster::callback<void (booster::system::error_code const&)> const&) (io_service.cpp:216) ==28026== by 0x525A2B9: booster::aio::deadline_timer::async_wait(booster::callback<void (booster::system::error_code const&)> const&) (deadline_timer.cpp:95) ==28026== by 0x4FA3071: cppcms::impl::cgi::http_watchdog::check(booster::system::error_code const&) (http_api.cpp:728) ==28026== by 0x4FA8B7A: cppcms::impl::cgi::http_creator::http_creator(booster::aio::io_service&, cppcms::json::value const&, std::string const&, int) (http_api.cpp:98) ==28026== by 0x4FA3907: cppcms::impl::cgi::http_api_factory(cppcms::service&, std::string, int, int) (http_api.cpp:740) ==28026== by 0x4EDEDFA: cppcms::service::setup_acceptor(cppcms::json::value const&, int, int) (service.cpp:765) ==28026== by 0x4EDF81F: cppcms::service::start_acceptor(bool) (service.cpp:823) ==28026== by 0x4EE1D15: cppcms::service::run_prepare() (service.cpp:478) ==28026== by 0x4EE1D29: cppcms::service::run() (service.cpp:557) ==28026== by 0x4732D6: main (main.cpp:81) and variants, making it a lot harder to see my own bugs :) Joerg ------------------------------------------------------------------------------ Put Bad Developers to Shame Dominate Development with Jenkins Continuous Integration Continuously Automate Build, Test & Deployment Start a new project now. Try Jenkins in the cloud. http://p.sf.net/sfu/13600_Cloudbees _______________________________________________ Cppcms-users mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppcms-users |
|
From: HuWenzhi <rus...@16...> - 2014-04-15 10:26:08
|
Mac 10.9.3 x64 / Darwin Kernel Version 13.1.0 SVN revision 2244 Python 2.7.5 cmake version 2.8.12.2 PCRE version 8.34 2013-12-15 gcc (GCC) 4.7.3 icu4c/52.1 i use: cmake -DCMAKE_C_COMPILER=/usr/local/bin/x86_64-apple-darwin13.1.0-gcc-4.7.3 -DCMAKE_CXX_COMPILER=/usr/local/bin/x86_64-apple-darwin13.1.0-g++-4.7 -DCMAKE_LIBRARY_PATH=/usr/local/Cellar/boost/1.55.0_1/lib -DCMAKE_INCLUDE_PATH=/usr/local/Cellar/boost/1.55.0_1/include -DDISABLE_ICONV=ON .. make make install make test so… —————————— 44% tests passed, 54 tests failed out of 97 Total Test time (real) = 48.55 sec The following tests FAILED: 17 - tc_test_shared (SEGFAULT) 18 - tc_test_separate (SEGFAULT) 19 - status_test (SEGFAULT) 20 - async_status_test (SEGFAULT) 21 - form_test (SEGFAULT) 22 - cookie_test (SEGFAULT) 23 - internal_forwarder_test (SEGFAULT) 24 - forwarder_test (SEGFAULT) 25 - jsonrpc_test (SEGFAULT) 26 - http_timeouts_test_read (SEGFAULT) 27 - http_timeouts_test_write (SEGFAULT) 28 - file_server_test (SEGFAULT) 29 - file_server_with_listing_test (SEGFAULT) 30 - disco_test_http (SEGFAULT) 31 - disco_test_fastcgi_tcp (SEGFAULT) 32 - disco_test_scgi_tcp (SEGFAULT) 33 - secure_post_test (SEGFAULT) 34 - disco_test_fastcgi_unix (SEGFAULT) 35 - disco_test_scgi_unix (SEGFAULT) 36 - gzip_test (SEGFAULT) 37 - cache_frontend_test (SEGFAULT) 38 - cppcms_service_test (Failed) 39 - session_interface_test_client_renew (SEGFAULT) 40 - session_interface_test_client_browser (SEGFAULT) 41 - session_interface_test_client_fixed (SEGFAULT) 42 - session_interface_test_server_renew (SEGFAULT) 43 - session_interface_test_server_browser (SEGFAULT) 44 - session_interface_test_server_fixed (SEGFAULT) 45 - session_interface_test_both_renew (SEGFAULT) 46 - session_interface_test_both_browser (SEGFAULT) 47 - session_interface_test_both_fixed (SEGFAULT) 48 - proto_test_async_http (SEGFAULT) 49 - proto_test_async_scgi (SEGFAULT) 50 - proto_test_async_fastcgi (SEGFAULT) 51 - proto_test_async_scgi_unix (SEGFAULT) 52 - proto_test_async_fastcgi_unix (SEGFAULT) 53 - proto_test_sync_http (SEGFAULT) 54 - proto_test_sync_scgi (SEGFAULT) 55 - proto_test_sync_fastcgi (SEGFAULT) 56 - proto_test_sync_scgi_unix (SEGFAULT) 57 - proto_test_sync_fastcgi_unix (SEGFAULT) 58 - loadable_storage_pass (SEGFAULT) 59 - loadable_storage_fail (SEGFAULT) 75 - test_aio_socket (Failed) 79 - test_locale_codepage (SEGFAULT) 80 - test_locale_message (SEGFAULT) 83 - test_locale_date_time (SEGFAULT) 84 - test_locale_generator (SEGFAULT) 85 - test_locale_config (SEGFAULT) 87 - test_locale_collate (SEGFAULT) 88 - test_locale_convert (SEGFAULT) 89 - test_locale_boundary (SEGFAULT) 90 - test_locale_formatting (SEGFAULT) 91 - test_locale_icu_vs_os_timezone (SEGFAULT) Errors while running CTest make: *** [test] Error 8 —————————— make hello_world: make CXX=/usr/local/bin/x86_64-apple-darwin13.1.0-g++-4.7 ./hello -c config.js then… Segmentation fault: 11 what’s wrong ? thanks. |
|
From: Joerg S. <jo...@br...> - 2014-04-11 00:41:35
|
Hello Artyom, can you run cppcms under valgrind? During startup I see the following: ==28026== Use of uninitialised value of size 8 ==28026== at 0x525BF54: booster::aio::io_service::set_timer_event(booster::ptime const&, booster::callback<void (booster::system::error_code const&)> const&) (io_service.cpp:216) ==28026== by 0x525A2B9: booster::aio::deadline_timer::async_wait(booster::callback<void (booster::system::error_code const&)> const&) (deadline_timer.cpp:95) ==28026== by 0x4FA3071: cppcms::impl::cgi::http_watchdog::check(booster::system::error_code const&) (http_api.cpp:728) ==28026== by 0x4FA8B7A: cppcms::impl::cgi::http_creator::http_creator(booster::aio::io_service&, cppcms::json::value const&, std::string const&, int) (http_api.cpp:98) ==28026== by 0x4FA3907: cppcms::impl::cgi::http_api_factory(cppcms::service&, std::string, int, int) (http_api.cpp:740) ==28026== by 0x4EDEDFA: cppcms::service::setup_acceptor(cppcms::json::value const&, int, int) (service.cpp:765) ==28026== by 0x4EDF81F: cppcms::service::start_acceptor(bool) (service.cpp:823) ==28026== by 0x4EE1D15: cppcms::service::run_prepare() (service.cpp:478) ==28026== by 0x4EE1D29: cppcms::service::run() (service.cpp:557) ==28026== by 0x4732D6: main (main.cpp:81) and variants, making it a lot harder to see my own bugs :) Joerg |
|
From: Artyom B. <art...@ya...> - 2014-04-01 17:31:55
|
The process will be restarted only in case of an ERROR (crash, exit code!=0 IIRC, etc) Once you send SIGTERM the application exits normally and the "watchdog" service does not restart the child Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ -------------------------------------------- On Mon, 3/31/14, 陈抒 <csf...@gm...> wrote: Subject: [Cppcms-users] how to test service.worker_processes? To: "cpp...@li..." <cpp...@li...> Date: Monday, March 31, 2014, 5:55 PM Today, I set service.worker_processes to 1, then launch my web server.I get two processes like below:dean@dean-ubuntu:~$ ps -def | grep data_collectordean 4812 4111 0 22:25 pts/0 00:00:00 bin/data_collector -c ../config.js dean 4813 4812 0 22:25 pts/0 00:00:00 bin/data_collector -c ../config.js I then kill 4813 process and wait, but it is not restarted. why? Dean Chen Best regards http://blog.csdn.net/csfreebird -----Inline Attachment Follows----- ------------------------------------------------------------------------------ -----Inline Attachment Follows----- _______________________________________________ Cppcms-users mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppcms-users |
|
From: 陈抒 <csf...@gm...> - 2014-03-31 14:55:35
|
Today, I set service.worker_processes to 1, then launch my web server. I get two processes like below: dean@dean-ubuntu:~$ ps -def | grep data_collector dean 4812 4111 0 22:25 pts/0 00:00:00 bin/data_collector -c ../config.js dean 4813 4812 0 22:25 pts/0 00:00:00 bin/data_collector -c ../config.js I then kill 4813 process and wait, but it is not restarted. why? Dean Chen Best regards http://blog.csdn.net/csfreebird |
|
From: Artyom B. <art...@ya...> - 2014-03-19 11:01:58
|
> I have two questions if I opt for this approach: > > (1) Can I simply use > cppcms::thread_pool &thread_pool() > in the central service or must I create my own instance of > cppcms::thread_pool? Yes you can use thread pool of the central service - it is designed for such job. > (2) Synchronous applications require below technique you > mentioned > earlier, or std::future or the likes, to get the results > "posted" back > by the jobs running in thread pool. Correct? > > **begin technique** > ... > **end technique** Basically it is a way to wait for something to happen in the current thread... Artyom |
|
From: CN <cn...@fa...> - 2014-03-18 12:01:04
|
Thank you for your kind reminder! I think I get your points.
> > Such hand made "cache" seems to be unable to fit my case. I
> > need to use
> > booster::aio::io_service as a synchronizer, like a mutex, to
> >
> > *sequentially* execute cppdb operations and manipulate
> > in-memory data.
>
> One VERY important point to alarm you.
>
> There is ONE even loop that handles LOTS of operations:
> incoming connections, uploads, transfers, request parsing,
> etc.
>
> It MUST not be blocked. As it basically blocks the entire CppCMS
> service from doing its job.
>
> If you call some heavy query to cppdb FROM the event loop
> or async app. You'll block the entire application.
>
> It is bad idea to abuse the even loop for such a purpose.
> Any operations in the async application or event loop must
> be as fast as possible and what is important - never block.
>
> If you run for example an SQL query that access the disk
> you may delay your entire cppcms application up to 6ms
> required for a physical disk to seek to the non-cached data.
>
> If you need to perform blocking/heavy operation by the async-app,
> inside event loop - post it to the thread pool and get the
> results "posted" back.
I have two questions if I opt for this approach:
(1) Can I simply use
cppcms::thread_pool &thread_pool()
in the central service or must I create my own instance of
cppcms::thread_pool?
(2) Synchronous applications require below technique you mentioned
earlier, or std::future or the likes, to get the results "posted" back
by the jobs running in thread pool. Correct?
**begin technique**
technically you can implement this by for example waiting for a
conditional variable.
that would be changed in the event loop:
Caller
------------------
this->resp_is_ready=false
async_app->service().get_io_service().post(boost::bind(&my_class::my_method,this));
while(true){
booster::unique_lock guard(this->resp_is_ready_mutex)
this->resp_is_ready_cond.wait(guard)
if(this->resp_is_ready)
break;
}
-------------
Handler
-------------
my_class:my_method()
{
// do something with async app/withing the event loop
booster::unique_lock guard(this->resp_is_ready_mutex);
this->resp_is_ready = true
this->resp_is_ready_cond.notify_one()
}
**end technique**
> If you want some "job queue" for sequential execution you'll probably
> want to
> create some additional execution queue,
>
> you may create your own booster::aio::io_service and run it in its own
> thread
> that would act like a dispatch queue (although it is most likely
> overkill)
>
> Or write your own simple job queue (which is quite a textbook tasks)
Regards,
CN
--
http://www.fastmail.fm - Accessible with your email software
or over the web
|
|
From: Artyom B. <art...@ya...> - 2014-03-18 10:57:44
|
> > Such hand made "cache" seems to be unable to fit my case. I > need to use > booster::aio::io_service as a synchronizer, like a mutex, to > > *sequentially* execute cppdb operations and manipulate > in-memory data. One VERY important point to alarm you. There is ONE even loop that handles LOTS of operations: incoming connections, uploads, transfers, request parsing, etc. It MUST not be blocked. As it basically blocks the entire CppCMS service from doing its job. If you call some heavy query to cppdb FROM the event loop or async app. You'll block the entire application. It is bad idea to abuse the even loop for such a purpose. Any operations in the async application or event loop must be as fast as possible and what is important - never block. If you run for example an SQL query that access the disk you may delay your entire cppcms application up to 6ms required for a physical disk to seek to the non-cached data. If you need to perform blocking/heavy operation by the async-app, inside event loop - post it to the thread pool and get the results "posted" back. If you want some "job queue" for sequential execution you'll probably want to create some additional execution queue, you may create your own booster::aio::io_service and run it in its own thread that would act like a dispatch queue (although it is most likely overkill) Or write your own simple job queue (which is quite a textbook tasks) Artyom |
|
From: CN <cn...@fa...> - 2014-03-18 09:27:37
|
Dear Artyom,
Many thanks for your swift and thorough clarification! It will take me
some time to digest your responses as I feel they contain so many
invaluable concepts.
> this is a synchronous app that it isn't correct (in most of cases)
Unfortunately "this" falls to this category. It refers to a descendant
of synchronous cppcms::application that is to be invoked by
cppcms::applications_factory.
> Now the case when you actually make the sync app to wait for the
> response...
>
> technically you can implement this by for example waiting for a
> conditional variable.
> that would be changed in the event loop:
>
> Caller
> ------------------
>
> this->resp_is_ready=false
>
> async_app->service().get_io_service().post(boost::bind(&my_class::my_method,this));
>
> while(true){
> booster::unique_lock guard(this->resp_is_ready_mutex)
> this->resp_is_ready_cond.wait(guard)
> if(this->resp_is_ready)
> break;
> }
> -------------
> Handler
> ---------------------
>
> my_class:my_method()
> {
> // do something with async app/withing the event loop
>
> booster::unique_lock guard(this->resp_is_ready_mutex);
> this->resp_is_ready = true
> this->resp_is_ready_cond.notify_one()
>
> }
By the way, I started to investigate std::future and std::promise. I am
not quite sure, yet, if they can be incorporated into cppcms framework.
Then I feel the last approach you offered (see below) is the most
elegant way for me to go.
> If you need to do a fast query from the event loop for some data without
> running too many mutexes
> it is ok. However it is still somewhat borderline. I'd suggest to keep
> some data in some global object
> with very short and fast accesses protected by mutexes.
Such hand made "cache" seems to be unable to fit my case. I need to use
booster::aio::io_service as a synchronizer, like a mutex, to
*sequentially* execute cppdb operations and manipulate in-memory data.
> But... if you want to put the thread on hold for a long time (for example
> to wait for some other event),
> it is very bad idea as you may run out of threads in the pool very fast.
>
> If you want to postpone the response of the synchronous application you
> may do the following steps:
>
> (a) detach the http::context (like in async app)
> (b) change the response().io_mode() to asynchronous
> (c) send the detached http::context to the async_app to handle it
> asynchronously vio post()...
>
> So basically sync app tells I don't want to handle it and give it away to
> the async app.
I feel this (the last 3 steps) is the most elegant solution of all, and
easy to follow.
Best Regards,
CN
--
http://www.fastmail.fm - A fast, anti-spam email service.
|
|
From: Artyom B. <art...@ya...> - 2014-03-18 07:53:18
|
Hello,
Excellent question.
It is both correct and isn't correct, depends on what you do.
See my notes
> My understanding is that all requests
> sent to booster::aio::io_service
> are processed "sequentially", meaning that these requests
> must wait in
> line for service from the single instance of
> booster::aio::io_service.
> This characteristic of "processing requests one at a time"
> refrains
> requests from racing issue. Locking is not required in such
> use case
> when aio is used instead.
Yes
> This is why my synchronous application calls
> io_service.post() in order
> to ensure no racing:
>
> async_app->service().get_io_service().post(boost::bind(&my_class::my_method,this));
>
Now there is a slight problem...
(a) what is "this"
(b) what thread "this" lives in
if this is an async application living in the event-loop thread - no problem.
if it is some persistent class (not a sync app!!!) that is only accessed from the event loop, it is ok as well.
this is a synchronous app that it isn't correct (in most of cases) because:
1. the synchronous application "lives" in the thread pool so the my_method would be called from a different thread (event-loop thread)
2. the synchronous application may not even exist when my_method is called because it was removed from the application cache
So it is better to pass the relevant data to the async_app withing the callback, i,e,
struct mydata {
// all data needed
void operator()() const // the callback
{
async_app->handle(this);
}
};
mydata info_for_async_thread;
async_app->service().get_io_service().post(info_for_async_thread);
> Now I want this synchronous application not to respond to
> clients and
> return immediately. Instead, this synchronous application
> will wait
> until my_class::my_method completes before it continues.
> Is such design correct? If it is, how do I implement this?
> If it is not,
> what alternatives do I have?
Now the case when you actually make the sync app to wait for the response...
technically you can implement this by for example waiting for a conditional variable.
that would be changed in the event loop:
Caller
------------------
this->resp_is_ready=false
async_app->service().get_io_service().post(boost::bind(&my_class::my_method,this));
while(true){
booster::unique_lock guard(this->resp_is_ready_mutex)
this->resp_is_ready_cond.wait(guard)
if(this->resp_is_ready)
break;
}
-------------
Handler
---------------------
my_class:my_method()
{
// do something with async app/withing the event loop
booster::unique_lock guard(this->resp_is_ready_mutex);
this->resp_is_ready = true
this->resp_is_ready_cond.notify_one()
}
--------------------------------------------------------
Now the question what do you need this for...
If you need to do a fast query from the event loop for some data without running too many mutexes
it is ok. However it is still somewhat borderline. I'd suggest to keep some data in some global object
with very short and fast accesses protected by mutexes.
But... if you want to put the thread on hold for a long time (for example to wait for some other event),
it is very bad idea as you may run out of threads in the pool very fast.
If you want to postpone the response of the synchronous application you may do the following steps:
(a) detach the http::context (like in async app)
(b) change the response().io_mode() to asynchronous
(c) send the detached http::context to the async_app to handle it asynchronously vio post()...
So basically sync app tells I don't want to handle it and give it away to the async app.
(this probably should go to wiki :-) )
Artyom Beilis
--------------
CppCMS - C++ Web Framework: http://cppcms.com/
CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/
|
|
From: CN <cn...@fa...> - 2014-03-18 06:57:19
|
My understanding is that all requests sent to booster::aio::io_service are processed "sequentially", meaning that these requests must wait in line for service from the single instance of booster::aio::io_service. This characteristic of "processing requests one at a time" refrains requests from racing issue. Locking is not required in such use case when aio is used instead. This is why my synchronous application calls io_service.post() in order to ensure no racing: async_app->service().get_io_service().post(boost::bind(&my_class::my_method,this)); Now I want this synchronous application not to respond to clients and return immediately. Instead, this synchronous application will wait until my_class::my_method completes before it continues. Is such design correct? If it is, how do I implement this? If it is not, what alternatives do I have? Regards, CN -- http://www.fastmail.fm - Or how I learned to stop worrying and love email again |