erebus

diff liberebus/src/threadpool.h @ 34:d15ee526daa6

- changed the UI font, made it a bit smaller - fixed the text positioning in the status bar - added ThreadPool::clear to remove all pending jobs - fixed the TargetCamera matrix calculation to avoid singularities when the camera looks straight up or down. - fixed ommited normalization in TargetCamera's matrix calculation - added paths/sec display in the status bar
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 08 Jun 2014 08:12:05 +0300
parents c8a6fb04fefa
children
line diff
     1.1 --- a/liberebus/src/threadpool.h	Sat Jun 07 14:21:56 2014 +0300
     1.2 +++ b/liberebus/src/threadpool.h	Sun Jun 08 08:12:05 2014 +0300
     1.3 @@ -32,11 +32,13 @@
     1.4  	void thread_func();
     1.5  
     1.6  public:
     1.7 -	ThreadPool(int num_threads = -1);
     1.8 +	// passing num_threads == -1 auto-detects based on number of processors
     1.9 +	explicit ThreadPool(int num_threads = -1);
    1.10  	~ThreadPool();
    1.11  
    1.12  	void add_work(std::function<void ()> func);
    1.13  	void add_work(std::function<void ()> work_func, std::function<void ()> done_func);
    1.14 +	void clear_work();
    1.15  
    1.16  	// returns the number of queued work items
    1.17  	int queued() const;