Scroom 0.14-49-gb7ae7a6d
Loading...
Searching...
No Matches
helpers.hh File Reference
#include <memory>
#include <boost/function.hpp>
#include <scroom/semaphore.hh>
#include <scroom/threadpool.hh>
Include dependency graph for helpers.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

boost::function< void()> pass (Semaphore *s)
 
boost::function< void()> clear (Semaphore *s)
 
boost::function< void()> destroy (std::shared_ptr< void > &p)
 
template<typename T >
boost::function< void()> destroy (std::shared_ptr< T > &p)
 

Function Documentation

◆ clear()

boost::function< void()> clear ( Semaphore s)
29{
30 return [s] { s->V(); };
31}
BitmapSurface::Ptr const s
Definition transformpresentation_test.cc:70

◆ destroy() [1/2]

template<typename T >
boost::function< void()> destroy ( std::shared_ptr< T > &  p)
25{
26 std::shared_ptr<void> pv = std::move(p);
27 return destroy(pv);
28}
PresentationInterfaceStub::Ptr const p
Definition determine-size-test.cc:172
boost::function< void()> destroy(std::shared_ptr< void > &p)
Definition helpers.cc:33
Here is the call graph for this function:

◆ destroy() [2/2]

boost::function< void()> destroy ( std::shared_ptr< void > &  p)
34{
35 return [p = std::move(p)]() mutable { p.reset(); };
36}

Referenced by destroy().

Here is the caller graph for this function:

◆ pass()

boost::function< void()> pass ( Semaphore s)
24{
25 return [s] { s->P(); };
26}

Referenced by has_at_least_n_threads().

Here is the caller graph for this function: