Discussion:
[asio-users] Custom io_service for Vulkan fences
Delacourt Christophe
2017-01-28 15:38:22 UTC
Permalink
Hi,

I work on a game engine and I plan use asio for network and file io. For
now I've a centralized thread pool responsible of all async ios.
I have also a parallel Vulkan renderer, and it should be great if I can
create a custiom asio service to async wait on Vulkan fences.
Fences are comparable to Win32 events and can be "polled" with an API
similar to WaitForSingleObject, but are not fd (not usable with
Overlapped or epoll).

Is it possible to write a custom service with such kind of objects ?
Thanks,

Christophe


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
asio-users mailing list
asio-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/asio-users
_______________________________________________
Using Asio? List your project at
http://think-async.com/Asio/WhoIsUsingAsio
Niall Douglas
2017-01-28 18:25:51 UTC
Permalink
Post by Delacourt Christophe
I work on a game engine and I plan use asio for network and file io.
I wouldn't recommend you use ASIO for file i/o. I wouldn't even
recommend that you use async i/o for file i/o. Not worth it.

(I speak as the main author of Boost.AFIO v1 and v2)

Niall
--
ned Productions Limited Consulting
http://www.nedproductions.biz/ http://ie.linkedin.com/in/nialldouglas/


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
asio-users mailing list
asio-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/asio-users
_______________________________________________
Using Asio? List your project at
http://think-async.com/Asio/WhoIsUsingAsio
Delacourt Christophe
2017-01-30 19:37:55 UTC
Permalink
Thanks for your answer, but to be honest, I don't expect anything in
term of pure async file io performance. I use intel TBB task framework
to perform heavy duty computation (Game Logic, Physics, AI, Gfx
Rendering...) . My plan is to use another thread pool to perform io,
fire timers, schedule long running/ low cpu tasks and maybe wait for GPU
events (Vulkan fences). The main reason for this is to avoid blocking in
TBB tasks which can affect badly overall performance. Asio seems to
fulfill most of my needs, except for Vulkan fences (or some kind of
generic reactor ?), hence my question.

Christophe



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
asio-users mailing list
asio-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/asio-users
_______________________________________________
Using Asio? List your project at
http://think-async.com/Asio/WhoIsUsingAsio
Dale Wilson
2017-01-30 20:52:50 UTC
Permalink
Hi Christophe,

Does this example of how to incorporate a third party library that does
it's own I/O into asio help:

http://www.boost.org/doc/libs/1_62_0/doc/html/boost_asio/example/cpp03/nonblocking/third_party_lib.cpp

Dale

On Mon, Jan 30, 2017 at 1:37 PM, Delacourt Christophe <
Post by Delacourt Christophe
Thanks for your answer, but to be honest, I don't expect anything in
term of pure async file io performance. I use intel TBB task framework
to perform heavy duty computation (Game Logic, Physics, AI, Gfx
Rendering...) . My plan is to use another thread pool to perform io,
fire timers, schedule long running/ low cpu tasks and maybe wait for GPU
events (Vulkan fences). The main reason for this is to avoid blocking in
TBB tasks which can affect badly overall performance. Asio seems to
fulfill most of my needs, except for Vulkan fences (or some kind of
generic reactor ?), hence my question.
Christophe
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
asio-users mailing list
https://lists.sourceforge.net/lists/listinfo/asio-users
_______________________________________________
Using Asio? List your project at
http://think-async.com/Asio/WhoIsUsingAsio
--
Dale Wilson
Principal Software Engineer
Object Computing, Inc.
Loading...