mirror of
https://github.com/rubyjs/therubyracer
synced 2023-03-27 23:21:42 -04:00
26 lines
586 B
C++
26 lines
586 B
C++
#ifndef RR_LOCKER
|
|
#define RR_LOCKER
|
|
|
|
namespace rr {
|
|
|
|
class Locker {
|
|
public:
|
|
static void Init();
|
|
|
|
static VALUE IsLocked(VALUE self, VALUE isolate);
|
|
static VALUE IsActive(VALUE self);
|
|
|
|
static VALUE Lock(int argc, VALUE* argv, VALUE self);
|
|
static VALUE Unlock(int argc, VALUE* argv, VALUE self);
|
|
|
|
protected:
|
|
static VALUE setupLockAndCall(Isolate isolate, int* state, VALUE code);
|
|
static VALUE doLockCall(VALUE code);
|
|
|
|
static VALUE setupUnlockAndCall(Isolate isolate, int* state, VALUE code);
|
|
static VALUE doUnlockCall(VALUE code);
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|