Jakob Progsch
588b59cfa1
Check stop condition under lock. Use emplace instead of push.
2014-09-25 12:06:19 +02:00
Jakob Progsch
20061c5c7f
Merge pull request #10 from vadz/master
...
Fix MSVS 2013 warning about a condition being always true.
2014-01-08 15:19:51 -08:00
Vadim Zeitlin
694dd35461
Fix MSVS 2013 warning about a condition being always true.
...
Use "for(;;)" for the infinite loop to avoid the warning at /W4 warning level.
2014-01-08 17:15:22 +01:00
Jakob Progsch
f659749e40
basic usage in readme
2013-05-22 12:02:29 +02:00
Jakob Progsch
7e8ad09213
removed legacy directory
2013-05-22 12:01:50 +02:00
Jakob Progsch
ac2a77d5cc
return type deduction now with result_of
...
as suggested by https://github.com/n00btime
return type deduction now uses std::result_of
which allows return type deduction for pointer
to members (and looks cleaner anyway).
2013-05-22 11:40:38 +02:00
Jakob Progsch
e398e2d7ed
fixed potential deadlock
2013-04-14 15:52:18 +02:00
Jakob Progsch
3d3d77a461
trailing whitespaces
2013-04-05 22:41:39 +02:00
Jakob Progsch
c32e66f682
Merge branch 'develop' of https://github.com/progschj/ThreadPool into develop
2013-04-05 22:40:24 +02:00
Jakob Progsch
7d93717b66
Changed nontemplates member to inline
...
This change allows the "library" to stay
header only. This might not be best practice
but helps keeping the more educational code
compact.
2013-04-05 22:36:56 +02:00
Jakob Progsch
978cf0ed97
Removed unnecessary forward declaration
2013-03-31 01:13:12 +01:00
Jakob Progsch
951db758d7
Removed Worker class in favor of a lambda capturing this
2013-03-29 23:10:56 +01:00
Jakob Progsch
5a8ca1709d
Reformated excessively long lines
2013-03-29 16:51:26 +01:00
Jakob Progsch
41355c071a
Pass task by universal reference and variadics
...
As suggested by daniel-j-h tasks are now taken by
universal reference and forwarded with std::forward.
Also enqueue takes a variadic argument list and binds
the arguments to the task.
2013-03-29 16:26:35 +01:00
Jakob Progsch
5d0ca72d50
Simplifications and fixes
...
Replaced deque by a queue (which by default uses a deque).
Simplified the task packaging as suggested by Ang3lus in issue #4 .
The destructor now waits for the queue to empty but throws
a std::runtime_error if enqueue is called on the stopped pool
(see issue #3 ).
2013-02-17 11:10:40 +01:00
Jakob Progsch
f76ae84be3
fixed wrong include
2012-10-16 15:44:21 +02:00
Jakob Progsch
3987b0972f
reorganised files
2012-10-16 12:32:03 +02:00
Jakob Progsch
3c5324ce45
added simple example
2012-10-16 12:21:29 +02:00
Jakob Progsch
2be8624350
added version that returns std::future<T> instead of the custom Result<T> type
2012-10-16 12:17:01 +02:00
Jakob Progsch
0dc616dfbf
added license
2012-10-05 02:38:59 +02:00
Jakob Progsch
0a86c00615
initial commit
2012-10-05 02:05:44 +02:00
Jakob Progsch
3a9b976881
Initial commit
2012-10-04 17:04:30 -07:00