SPVM

 view release on metacpan or  search on metacpan

lib/SPVM/Document/Language/System.pm  view on Meta::CPAN

The L<say operator|SPVM::Document::Language::Operators/"say Operator"> outputs to this SPVM's standard output.

The L<warn operator|SPVM::Document::Language::Operators/"warn Operator"> outputs to this SPVM's standard error.

=head2 Thread Safety

The SPVM language has some thread-safe features.

=head3 Runtime Stack

When a new thread, such as an L<OS native thread|SPVM::Thread>, a coroutine such as a L<goroutine|SPVM::Go> is created, a new L<runtime stack|SPVM::Document::NativeClass/"Runtime Stack"> should be created for the new thread.

  SPVM_VALUE* new_stack = env->new_stack(env);

This runtime stack has thread-specific data, such as the value of the exception variable, as well as method-specific data, such as arguments and a return value.

When the new thread finished, the new runtime stack must be released.

  env->free_stack(env, new_stack);

Currently, user data cannot be got and set in a runtime stack.



( run in 0.368 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )