forked from M-Labs/artiq
artiq/language/core.py: define print_rpc
This commit is contained in:
parent
87154ea016
commit
be3f05a4c0
|
@ -6,6 +6,7 @@ from typing import Generic, TypeVar
|
|||
from functools import wraps
|
||||
from inspect import getfullargspec, getmodule
|
||||
from types import SimpleNamespace
|
||||
from typing import TypeVar
|
||||
from math import floor, ceil
|
||||
|
||||
from artiq.language import import_cache
|
||||
|
@ -16,7 +17,8 @@ __all__ = [
|
|||
"round64", "floor64", "ceil64",
|
||||
"extern", "kernel", "portable", "nac3", "rpc",
|
||||
"parallel", "sequential",
|
||||
"set_watchdog_factory", "watchdog", "TerminationRequested"
|
||||
"set_watchdog_factory", "watchdog", "TerminationRequested",
|
||||
"print_rpc"
|
||||
]
|
||||
|
||||
|
||||
|
@ -106,6 +108,14 @@ def rpc(arg=None, flags={}):
|
|||
return inner_decorator
|
||||
return arg
|
||||
|
||||
|
||||
T = TypeVar('T')
|
||||
|
||||
@rpc
|
||||
def print_rpc(a: T):
|
||||
print(a)
|
||||
|
||||
|
||||
@nac3
|
||||
class KernelContextManager:
|
||||
@kernel
|
||||
|
|
Loading…
Reference in New Issue