~ppsspp/ppsspp/ppsspp-1.2.2

« back to all changes in this revision

Viewing changes to ext/native/thread/executor.h

  • Committer: Sérgio Benjamim
  • Date: 2016-04-25 02:30:18 UTC
  • Revision ID: sergio_br2@yahoo.com.br-20160425023018-wk3rd7nu30fejjzz
1.2.2 source.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#pragma once
 
2
 
 
3
#include "base/functional.h"
 
4
 
 
5
namespace threading {
 
6
 
 
7
// Stuff that can execute other stuff, like threadpools, should inherit from this.
 
8
class Executor {
 
9
 public:
 
10
  virtual void Run(std::function<void()> func) = 0;
 
11
};
 
12
 
 
13
class SameThreadExecutor : public Executor {
 
14
 public:
 
15
  virtual void Run(std::function<void()> func);
 
16
};
 
17
 
 
18
}  // namespace threading