All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Scripting::Lock Class Reference

JavaScript context locker. More...

#include <JS/Context.hpp>

Public Member Functions

 Lock ()
 Locks the default context.
 
 Lock (JSContext &context)
 Locks a context. More...
 
 ~Lock ()
 Releases the lock. More...
 

Detailed Description

JavaScript context locker.

MultiWidgets::Application locks automatically the main thread during update and input processing. In all other cases context needs to be locked manually (for example in custom background thread or Luminous::Task) every time any v8 code is called.

Constructor & Destructor Documentation

Scripting::Lock::Lock ( JSContext context)

Locks a context.

Parameters
contextto lock
Scripting::Lock::~Lock ( )

Releases the lock.