|
Boost Users : |
Subject: Re: [Boost-users] [boost-TLS] Thread Local Storage (TLS) Question
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2013-11-24 15:55:01
On 24 Nov 2013 at 11:16, Kyle Ketterer wrote:
> Another thing to note is that when calling detach() on the thread, all of
> the threads execute properly and I get expected output. However, I need to
> call join() every x amount of threads due to OS limitations of how many
> threads can actually be created. I need to read about 5000 files so
> obviously I can't create 5000 threads as Windows maxes out at 700 I
> believe. I am reading files off of a RAID setup so I believe this is a
> situation that can benefit from multiple threads reading files.
You shouldn't use threads to read from many files in parallel - you
should use the very well designed Win IOCP API to do asynchronous
file operations.
There is a new Boost library called AFIO in the peer review queue
(http://www.boost.org/community/review_schedule.html) which extends
Boost.ASIO with asynchronous file i/o support. If you don't like
AFIO, use libuv which is a C library also implementing portable
asynchronous file i/o.
Niall
-- Currently unemployed and looking for work. Work Portfolio: http://careers.stackoverflow.com/nialldouglas/
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net