Boost logo

Boost :

Subject: Re: [boost] boost::signal poor performance
From: Hansi (hansipet_at_[hidden])
Date: 2008-09-25 01:34:43


I think it is because you have build the library with SECURE_SCL=1
defined. It has not a compatible ABI!
I think boost should also make by default this libraries and autolink
against the right one...

Best regards
Hansjörg

Wang Yun schrieb:
> Hi, I met a crash when define _SECURE_SCL=0 in release mode
> but in debug mode, it's ok, I'm using VC2005.
>
> in e:\libraries\boost_1_36_0\boost\signals\detail\named_slot_map.hpp
>
> void init_next_group()
> {
> while (group != last_group && group->second.empty()) ++group;
> if (group != last_group) {
> slot_ = group->second.begin(); // crash and debugger stops at here
> slot_assigned = true;
> }
> }
>
> //////// code below
>
> class TestSignal
> {
> public:
>
> int counter;
>
> void OnEventReceived(char b)
> {
> counter++;
> }
> };
>
> int _tmain(int argc, _TCHAR* argv[])
> {
> int const times = 100000;
>
> TestSignal testSignal;
> boost::signal<void (char)> sig;
>
> sig.connect(boost::bind(&TestSignal::OnEventReceived,&testSignal,_1));
>
> for(int i = 0; i < times; i++)
> {
> sig('a');
> }
> }
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk