|
Concrete Python
git-339c971
|
#include <concrete/context.hpp>
Inheritance diagram for Context:
Collaboration diagram for Context:Classes | |
| struct | Data |
Public Member Functions | |
| Context (EventLoop &loop) | |
| Context (EventLoop &loop, void *data, size_t size) | |
| bool | is_active () const throw () |
| EventLoop & | event_loop () throw () |
| Arena & | arena () throw () |
| ResourceManager & | resource_manager () throw () |
| Data * | data () |
| const Data * | nonthrowing_data () throw () |
| const Pointer & | none_pointer () const throw () |
| Object | load_builtin_name (const Object &name) |
| Object | import_builtin_module (const Object &name) |
| void | add_execution (const Execution &execution) |
| Portable< Execution > & | execution () throw () |
| void | suspend_until (const EventTrigger &trigger) |
| bool | executable () throw () |
| bool | execute () |
Static Public Member Functions | |
| static Context & | Active () throw () |
Python interpreter state. Instances are isolated from one another, so one process can have multiple interpreters running--either in separate threads or interleaved in common threads. A thread must not make nested calls to different Context instances because the active instance is passed around via thread-local data (without support for nesting).
Create a new state.
| loop | is owned by the caller and must live over the lifetime of the created Context instance |
Load state from a snapshot.
| loop | is owned by the caller and must live over the lifetime of the created Context instance |
| data | will be copied |
| size | of the data in bytes |
| void add_execution | ( | const Execution & | execution | ) |
Add a new executor. It will be scheduled at some point.
| execution | reference is stolen |
| Context::Data * data | ( | ) |
Direct access to internal object vector.
| EventLoop& event_loop | ( | ) | throw () |
Access the I/O event interface.
| bool executable | ( | ) | throw () |
Are there any unfinished executors (and the interpreter is in normal state)?
| bool execute | ( | ) |
Schedule an executor.
Get the active executor of this interpreter.
| Object import_builtin_module | ( | const Object & | name | ) |
Look up an internal module.
| bool is_active | ( | ) | const throw () |
Is this the active instance of the current thread?
| Object load_builtin_name | ( | const Object & | name | ) |
Look up an internal function or constant.
| const Pointer& none_pointer | ( | ) | const throw () |
Uncounted reference to the NoneObject instance.
| const Context::Data * nonthrowing_data | ( | ) | throw () |
Direct access to internal object vector.
| ResourceManager& resource_manager | ( | ) | throw () |
Access the transient resources.
| void suspend_until | ( | const EventTrigger & | trigger | ) |
Suspend the active executor until an I/O event occurs.
| trigger | specifies the event which causes execution to resume |
1.7.6.1