Discussion:
[Boost-users] [fiber] Asio autoecho example crashes (VS 2015 u3)
DePizzottri
2016-10-06 10:51:23 UTC
Permalink
Hi all,

I'm found that asio autoecho example crashes after main's return statement.
Debugger shows write access from the fiber scheduler to the already destroed
io_service.

Substitution reference to io_service:
boost::asio::io_service & io_svc_;

in round_robin algo to the shared_ptr:
boost::shared_ptr<boost::asio::io_service> io_svc_;

with approprieate correction of the other code solves the problem.

Maybe I misunderstood something in the descrition from documentation? Or its
some kind of feature?



--
View this message in context: http://boost.2283326.n4.nabble.com/fiber-Asio-autoecho-example-crashes-VS-2015-u3-tp4688641.html
Sent from the Boost - Users mailing list archive at Nabble.com.
Oliver Kowalke
2016-10-10 08:13:09 UTC
Permalink
changed in examples, thx
it's not easy to synchronize two event dispatcher/schedulers, e.g.
boost.asio's io_service + boost.fiber's fiber-scheduler
DePizzottri
2016-10-11 05:16:42 UTC
Permalink
yes, i realized this from documetation)

after some profiling and changing queue in "work_sharing" example to
lock-free i got about 4x performance increasing: profiler shows that most of
time it spends to lock/unlock.
Any plans to add more sheduler alogo?



--
View this message in context: http://boost.2283326.n4.nabble.com/fiber-Asio-autoecho-example-crashes-VS-2015-u3-tp4688641p4688756.html
Sent from the Boost - Users mailing list archive at Nabble.com.
Oliver Kowalke
2016-10-11 05:47:59 UTC
Permalink
Post by DePizzottri
yes, i realized this from documetation)
after some profiling and changing queue in "work_sharing" example to
lock-free i got about 4x performance increasing: profiler shows that most of
time it spends to lock/unlock.
Any plans to add more sheduler alogo?
yes, I've some experimental queue impls
which type of lock-free queue did you use (chase_lev algorithm)?
DePizzottri
2016-10-11 05:57:13 UTC
Permalink
just replaced queue to this https://github.com/cameron314/concurrentqueue
<https://github.com/cameron314/concurrentqueue>
I think work stealing should give even more performance.



--
View this message in context: http://boost.2283326.n4.nabble.com/fiber-Asio-autoecho-example-crashes-VS-2015-u3-tp4688641p4688758.html
Sent from the Boost - Users mailing list archive at Nabble.com.

Loading...