Commit Graph

10 Commits

Author SHA1 Message Date
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
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
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
3987b0972f reorganised files 2012-10-16 12:32:03 +02:00
Jakob Progsch
0a86c00615 initial commit 2012-10-05 02:05:44 +02:00