class Medusa::Runtime

Defined in:

medusa/runtime.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def can_block=(val : Bool) : Nil #

[View source]
def drain_jobs : Int32 #

Drains all pending jobs. Returns the number of jobs executed.


[View source]
def execute_pending_job : Tuple(Bool, QuickJS::JSContext) #

Executes one pending job. Returns {success, context} where success is true if a job was executed, false if none pending. Raises on JS exception during job execution (returns < 0).


[View source]
def finalize : Nil #

[View source]
def freed? : Bool #

[View source]
def gc_threshold=(threshold : UInt64) : Nil #

[View source]
def info=(info : String) : Nil #

[View source]
def job_pending? : Bool #

[View source]
def live_object?(obj : QuickJS::JSValue) : Bool #

[View source]
def mark_freed! : Nil #

[View source]
def max_stack_size=(size : UInt64) : Nil #

[View source]
def memory_limit=(limit : UInt64) : Nil #

[View source]
def memory_usage : QuickJS::JSMemoryUsage #

[View source]
def opaque : Pointer(Void) #

[View source]
def opaque=(ptr : Pointer(Void)) : Nil #

[View source]
def run_gc : Nil #

[View source]
def setup_module_loader : Nil #

Enables file-based ES module loading. After calling this, all contexts on this runtime can use import / export with file paths. Relative paths are resolved from the importing module's directory. This runs entirely in C — no Crystal closures cross the FFI boundary.


[View source]
def strip_info : Int32 #

[View source]
def strip_info=(flags : QuickJS::StripFlag) : Nil #

[View source]
def to_unsafe : QuickJS::JSRuntime #

[View source]
def update_stack_top : Nil #

[View source]